Module 1 DDCO
Module 1 DDCO
Module 1 DDCO
MODULE-1
Introduction to Digital Design: Binary Logic, Basic Theorems and Properties of Boolean
Algebra, Boolean Functions, Digital Logic Gates, Introduction, The Map Method, Four-
Variable Map, Don’t-Care Conditions, NAND and NOR Implementation, Other Hardware
Description Language – Verilog Model of a simple circuit.
Logic Gates:
Logic gates are electronic circuits that operate on one or more input signals to produce
an output signal. Electrical signals such as voltages or currents exist as analog signals having
values ranging, from 0 to 3 V, are interpreted as 0 or 1 in digital.
1
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
The timing diagrams shows the idealized response of each gate as shown in fig 2. The horizontal
axis of the timing diagram represents the time, and the vertical axis shows the signal as it
changes between the two possible voltage levels.
➢ The low level represents logic 0, the high level represents logic.
➢ The AND gate responds with a logic 1 output signal when both input signals are
logic 1.
➢ The OR gate responds with a logic 1 output signal if any input signal is logic 1.
➢ The NOT gate is commonly referred to as an inverter. The reason for this name is
that the output signal inverts the logic sense of the input signal.
2
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
The table lists the six theorems of Boolean algebra and four of its postulates.
The theorems and postulates listed are the most basic relationships in Boolean algebra.
The theorems, like the postulates, are listed in pairs; each relation is the dual of the one
paired with it.
The postulates are basic axioms of the algebraic structure and need no proof.
The theorems must be proven from the postulates.
3
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Table 1
Proofs:
The theorem 1(b) is the dual of theorem 1(a) and that each step of the proof in part (b) is the
dual of its counterpart in part (a). Any dual theorem can be similarly derived from the proof of
its corresponding theorem.
Theorem 3:
(x’)’◻ = x. From postulate 5, we have x + x’ = 1 and x .x’◻ = 0, which together define the
complement of x. The complement of x◻ is x and is also (x’)’.
4
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
The theorems of Boolean algebra can be proven by means of truth tables. The following
truth table verifies the first absorption theorem ie., x= x + xy
The truth table for the first DeMorgan’s theorem, (x + y)’ = x’y’, is as follows:
Operator Precedence:
The operator precedence for evaluating Boolean expressions is
1) Parentheses,
2) NOT
3) AND
4) OR
The expressions inside parentheses must be evaluated before all other operations. The next
operation that holds precedence is the complement, and then follows the AND and, finally, the
OR. Example, consider the truth table for one of DeMorgan’s theorems. The left side of the
expression is (x + y)’. Therefore, the expression inside the parentheses is evaluated first and
the result then complemented. The right side of the expression is x’y’, so the complement of x
and the complement of y are both evaluated first and the result is then ANDed.
5
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Boolean Functions:
Boolean algebra is an algebra that deals with binary variables and logic operations. A
Boolean function described by an algebraic expression consists of binary variables, the
constants 0 and 1, and the logic operation symbols. For a given value of the binary variables,
the function can be equal to either 1 or 0. Consider the Boolean function F1 = x + y’z . The
function F1 is equal to 1 if x is equal to 1 or if both y’ and z are equal to 1. F1 is equal to 0
otherwise.
• A Boolean function can be represented in a truth table.
• The no. of rows in the truth table is 2n , where n is the no. of variables in the function.
• The binary combinations for the truth table are from 0 through 2n - 1.
Below table shows the truth table for the function F1. There are eight possible binary
combinations for assigning bits to the three variables x, y, and z.
There is only one way that a Boolean function can be represented in a truth table. However,
when the function is in algebraic form, it can be expressed in a variety of ways, all of which
have equivalent logic.
6
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Since both expressions produce the same truth table, they are equivalent. Therefore, the two
circuits have the same outputs for all the inputs of the three variables. Each circuit implements
the same identical function, but the one with fewer gates and fewer inputs to gates is preferable
because it requires fewer wires and components. In general, there are many equivalent
representations of a logic function. Finding the most economic representation of the logic is an
7
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
DeMorgan’s theorems for any number of variables is same as the two‐variable case in form.
These theorems can be generalized as follows
The generalized form of DeMorgan’s theorems states that the complement of a function is
8
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
9
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
10
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
11
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Choosing the high‐level H to represent logic 1 defines a positive logic system. Choosing the
low‐level L to represent logic 1 defines a negative logic system. Hardware digital gates are
defined in terms of signal values such as H and L. It is up to the user to decide on a positive or
negative logic polarity. Consider, for example, the electronic gate shown below in Fig. (b). The truth
table for this gate is listed in Fig. (a). It specifies the physical behavior of the gate when H is 3 V and L
is 0 V. The truth table of Fig. (c) assumes a positive logic assignment, with H = 1 and L =0. This truth
table is the same as the one for the AND operation. The graphic symbol for a positive logic AND gate
is shown in Fig. (d).
12
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Now consider the negative logic assignment for the same physical gate with L = 1 and H= 0.
The result is the truth table of Fig. (e). This table represents the OR operation, even though the
entries are reversed. The graphic symbol for the negative logic OR gate is shown in Fig. (f).
The small triangles in the inputs and output designate a polarity indicator, the presence of which
along a terminal signifies that negative logic is assumed for the signal.
Thus, the same physical gate can operate either as a positive‐logic AND gate or as a negative‐
logic OR gate. The conversion from positive logic to negative logic and vice versa is essentially
an operation that changes 1’s to 0’s and 0’s to 1’s in both the inputs and the output of a gate.
Now onwards, we will not use negative logic gates and will assume that all gates operate with
a positive logic assignment.
13
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
14
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
NOR Implementation:
The NOR operation is the dual of the NAND operation. Therefore, all procedures and
rules for NOR logic are the duals of the corresponding procedures and rules developed for
NAND logic. The implementation of the complement(NOT), OR, and AND operations with
NOR gates is shown below.
15
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Why HDL?
As a documentation language, an HDL is used to represent and document digital systems
in a form that can be read by both humans and computers. It is suitable as an exchange language
between designers. The language content can be stored, retrieved, edited, and transmitted
easily and processed by computer software in an efficient manner.
16
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
• Logic simulation displays wave forms of the input and the output signals. Simulation
detects functional errors in a design without having to physically create and operate the
circuit.
• Logic synthesis is the process of deriving a list of physical components and their
interconnections (called a netlist) from the model of a digital system described in an
HDL. It produces a database describing the elements and structure of a circuit. The
netlist is used to fabricate an integrated circuit.
• Timing verification confirms that the fabricated, integrated circuit will operate at a
specified speed. Because each logic gate in a circuit has a propagation delay, a signal
transition at the input of a circuit cannot immediately cause a change in the logic value
of the output of a circuit.
• Fault simulation compares the behavior of an ideal circuit with the behavior of a circuit
that contains a process-induced flaw. Dust and other particulates in the atmosphere of
the clean room can cause a circuit to be fabricated with a fault.
There are two standard HDLs that are supported by the IEEE: VHDL and Verilog.
VHDL:
• VHDL is a Department of Defense–mandated language.
• The V in VDHL stands for VHSIC, an acronym for Very High-Speed Integrated
Circuit.
• VHDL is more difficult to learn than Verilog.
• Because Verilog is an easier language than VHDL to describe, learn, and use.
Verilog HDL:
The Verilog HDL was initially approved as a standard HDL in 1995; revised
and enhanced versions of the language were approved in 2001 and 2005.
17
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
⚫ input,
⚫ output,
⚫ wire,
⚫ and,
⚫ or, &
⚫ not.
Any text between two forward slashes ( // ) and the end of the line is a comment and will have
no effect on a simulation. Multiline comments begin with / * and terminate with * /. Blank
spaces are ignored, but they may not appear within the text of a keyword, a user-specified
identifier, an operator, or the representation of a number. Verilog is case sensitive. e.g., not is
not the same as NOT. A module is the fundamental descriptive or declaration unit in the
Verilog language. It is declared by the keyword module and must always be terminated by the
keyword endmodule.
Example:
18
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
• Identifiers are composed of alpha numeric characters and the underscore (_), and are
case sensitive. Identifiers must start with an alphabetic character or an underscore, but
they cannot start with a number.
• The ports are the inputs and outputs of the circuit.
• The port list is enclosed in parentheses, and commas are used to separate elements of the
list. The statement is terminated with a semicolon (;).
• The keywords input and output specify which of the ports are inputs and which are
outputs.
• Internal connections are declared as wires.
• The keywords and, not, & or are the (predefined) primitive gates.
• Each gate instantiation consists of an optional name (such as G1, G2 , etc.) followed by
the gate output and inputs separated by commas and enclosed within parentheses.
• Note: The output of a primitive must be listed first, but the inputs and outputs of a module
may be listed in any order.
• Each statement must be terminated with a semicolon. but there is no semicolon after
• endmodule.
• The module description ends with the keyword endmodule.
19
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE
Digital Design & Computer Organization (BCS302) Module:1 Introduction to Digital Design
Gate Delays:
• All physical circuits exhibit a propagation delay between the input and the output.
• When an HDL model of a circuit is simulated, it is sometimes necessary to specify the
amount of delay from the input to the output of its gates.
• The timescale directive (‘timescale 1 ns / 1 ps) specifies that the numerical values in the
model are to be interpreted in units of nanosecond swith a precision of picoseconds.
• Eg: and G1 #30 (w1, A, B); // Propagation delay: 30 ns.
Boolean Expressions:
Boolean equations describing combinational logic are specified in Verilog with a
continuous assignment statement consisting of the keyword assign followed by a Boolean
expression. Verilog uses the symbols & ( AND) / (OR) ~ NOT (complement).
Write the Verilog HDL for the following two boolean expressions:
E = A + BC + B’D
F = B’C + BC’D’
20
Mrs. Arjuman Nasreen Banu, Assistant Professor, Dept. of CSE, GCE