Professional Documents
Culture Documents
Fundamentals of Digital Computers: Unit - Ii
Fundamentals of Digital Computers: Unit - Ii
UNIT – II
2.1 DIGITAL LOGIC
2.1.1 THE BASIC GATES
A digital circuit having one or more input signals but only one output signal is
called a gate.
There are three basic gates,
NOT GATE (INVERTER)
AND GATE
OR GATE
NOT GATE (INVERTER)
One of the most basic operations in a digital system is inversion, or negation.
This requires a circuit that will invert a digital level. This logic circuit is called an
inverter, or a NOT circuit. It is also referred as complement operation.
The complement of x is x.
The complement if x+y is x+y.
0 =1
1 =0
Inverter
The complementation operation is physically realized by a gate or circuit called
an Inverter.
Block diagram
Truth Table
Page 50
FUNDAMENTALS OF DIGITAL COMPUTERS
The pinout diagram of a 7404 hex inverter. This IC contains six inverters. After
applying +5 Vdc (the supply voltage for all TTL devices) to pin 14 and grounding pin 7,
you can connect any or all inverters to other TTL devices.
OR GATE
The OR gate has two or more input but only one output. If either one or both
inputs are 1 (high) then the output will be 1 (high) otherwise the output will be 0 (low)
(or) when both input is 0 (low), the output will be 0 (low), otherwise the output will be
one (high).
Block diagram (Two Input)
Page 51
FUNDAMENTALS OF DIGITAL COMPUTERS
TTL OR Gate
The pinout diagram of a 7432, a TTL quad 2-input OR gate.
This digital IC contains four 2-input OR gates inside a 14-pin DIP. After
connecting a supply voltage of +5 V to pin 14 and a ground to pin 7, we can connect one
or more of the OR gates to other TTL devices.
Timing Diagram
Page 52
FUNDAMENTALS OF DIGITAL COMPUTERS
The input voltages drive pins 1 and 2 of a 7432. Here the output (pin 3) is low
only when both inputs are low. The output is high the rest of the time because one or
more input pins are high.
AND GATE
The AND gate has two or more input but only one output. If both inputs are 1
then the output will be 1 otherwise the output will be 0.(or) If any one of the input is
zero, the output will be zero, otherwise the output will be one.
Block diagram (Two Input)
Page 53
FUNDAMENTALS OF DIGITAL COMPUTERS
This digital IC contains four 2-input AND gates. After connecting a supply
voltage of +5V to pin 14 and a ground to pin 7, you can connect one or more of the
AND gates to other TTL devices. TTL AND gates are also available in triple 3-input and
dual 4-input packages.
Timing Diagram
An example of a timing diagram for a 2-input AND gate. The input voltages
drive pins 1 and 2 of a 7408. Notice that the output (pin 3) is high only when both
inputs are high (between C and D, G and H, etc.). The output is low the rest of the time.
Page 54
FUNDAMENTALS OF DIGITAL COMPUTERS
NOR GATE
The complement of OR gate is called NOR gate. NOR has an OR gate followed
by an inverter (NOT gate).
Block diagram (Two Input)
The new IEEE rectangular symbol for the NOR gate is,
The small triangle on the output is equivalent to the bubble used on the standard
symbol. The indicator ≥ inside the box means "if one or more of the inputs are high, the
output is high."
The 7402 is a quad 2-input NOR gate in a 14-pin DIP and the new rectangular
symbol for the 7402.
Page 55
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 56
FUNDAMENTALS OF DIGITAL COMPUTERS
The bubbled AND gate is the combination of two NOT gates and one AND gate.
That is, the output of two NOT gates is made as input of AND gate.
The Boolean expression for the output of this gate is,
Y = A . B = A + B (Demorgan’s theorem)
Universality of NOR Gate
We can get the other basic gates (NOT, OR, AND) from NOR gate. This is called
as universality of NOR gate.
1) NOT from NOR 2) OR from NOR
NAND GATE
The complement of AND gate is called NAND gate. NAND has an AND gate
followed by an inverter (NOT gate).
Block diagram (Two Input)
The small triangle on the output is equivalent to the bubble used on the standard
symbol. The indicator "&" inside the box means "the output is high only when all inputs
are high."
Page 57
FUNDAMENTALS OF DIGITAL COMPUTERS
The 7400 is a quad 2-input NAND gate in a 14-pin DIP and the new rectangular
symbol for the 7402.
Truth table (Two Input)
Page 58
FUNDAMENTALS OF DIGITAL COMPUTERS
Bubbled OR Gate
The bubbled OR gate is the combination of two NOT gates and one OR gate.
That is, the output of two NOT gates is made as input of OR gate.
The Boolean expression for the output of this gate is,
Y = A + B = A . B (Demorgan’s theorem)
Universality of NAND Gate
We can get the other basic gates (NOT, OR, AND) from NAND gate. This is
called as universality of NAND gate.
1) NOT from NAND 2) AND from NAND:
3) OR from NAND
Since NAND gates are the preferred TTL gates, we would build the circuit.
NAND-NAND circuits like this are important because with them we can build any
desired logic circuit.
TTL Devices
Page 59
FUNDAMENTALS OF DIGITAL COMPUTERS
AND-OR circuits are not easily derived from the basic NAND-gate design. But it
is easy to get an ANDOR-INVERT circuit.
A variety of circuits like this are available as TTL chips. Because of the inversion,
the output has the equation shown below.
Y= AB+CD
The AND-OR-INVERT gates available in the 7400 series are
In this table, 2-wide means two AND gates across, 4-wide means four AND gates
across, and so on.
For instance, the 7454 is a 2-input 4-wide AND-OR-INVERT gate; each AND gate
has two inputs (2-input), and there are four AND gates (4-wide).
Page 60
FUNDAMENTALS OF DIGITAL COMPUTERS
The logic symbol for an expandable AND-OR-INVERT gate. There are two
additional inputs, labeled bubble and arrow.
The expandable AND-OR-INVERT gates in the 7400 series are,
Expanders
We connect the output of an expander to the arrow and bubble inputs of an
expandable gate (connect bubble to bubble and arrow to arrow).
Page 61
FUNDAMENTALS OF DIGITAL COMPUTERS
This shows the logic circuit of the outputs expander connected to the arrow and
bubble inputs of the expandable AND-OR-INVERTER gate. This means that the
expander outputs are being ORed with the signals of the AND-OR-INVERT gate.
In other words, the logic circuit is equivalent to the AND-OR-INVERT circuit.
We can connect more expanders. The circuit shows two expanders driving the
expandable gate. Now we have a 2-2-4-4-input 4-wide AND-OR-INVERT circuit.
The 7460 is a dual 4-input expander. The 7450, a dual expandable AND-OR-
INVERT gate, is designed for use with up to four 7460 expanders. This means that we
can add two more expanders in above circuit to get a 2-2-4-4-4-4-input 6-wide AND-
OR-INVERT circuit.
2.1.4 POSITIVE AND NEGATIVE LOGIC:
If we use the binary 0 for low voltage and binary 1 for high voltage, then it is
called as positive logic.
If we use the binary 0 for high voltage and binary 1 for low voltage, then it is
called as negative logic.
Positive and Negative Gates
An OR gate in a positive logic system becomes an AND gate in a negative logic
system.
Page 62
FUNDAMENTALS OF DIGITAL COMPUTERS
This circuit is an OR gate when we use it in positive logic, if either the input is
high, the output is high, that is in positive logic system, binary 0 stands for low and
binary 1 stands for high.
We can convert this table to the form of binary form of 0s and 1s.
In a negative logic, binary 1 stands for low and binary 0 stands for high. With
this logic, we can convert the above the table as,
In a similar way, we can show the truth table of other gates with positive or
negative logic.
By analyzing the inputs and outputs in terms of 0s and 1s, we find these
equivalences between the positive and negative logic:
These gates and their definitions in terms of voltage levels are summarizes as,
Page 63
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 64
FUNDAMENTALS OF DIGITAL COMPUTERS
Example,
X+Y=Z
Each of the variables X, Y and Z may have only the values 0 or 1.
The + symbol is placed between two variables say X and Y since both X and Y
can take only the role 0 or 1.
Logical Addition
First important operation in Boolean algebra is logical Addition or the logical OR
operation. This is a logical addition table.
Input Output
0+0 0
0+1 1
1+0 1
1+1 1
Logical Multiplication
A second important operation in Boolean algebra is logical multiplication or the
logical AND operation.
Input Output
0.0 0
0.1 0
1.0 0
1.1 1
Only when both inputs are 1 the result will be 1.
Both + and . obey a mathematical rule called the associative law.
This law says for +
(X + Y) +Z = X + (Y + Z)
And for . X. (Y . Z) = (X . Y) . Z
2.1 BOOLEAN LAWS AND THEOREMS:
2.1.1 Boolean algebra rules:
X+Y=Y+X
X .Y = Y . X COMMUTATIVE LAW
X + (Y + Z) = (X + Y) + Z
Page 65
FUNDAMENTALS OF DIGITAL COMPUTERS
X (Y Z) = (X Y) Z ASSOCIATIVE LAW
X ( Y + Z ) = X Y +X Z - DISTRIBUTIVE LAW
0+X=X
1+X=1
X+X=X OR Operations
X+X=1
1.X=X
0.X=0
X.X=X AND Operations
X.X=0
X=X - Double Inversion
X+Y=X.Y
X.Y=X+Y DEMorgan’s Theorem
X=X
X+XZ=X
X(X+Y)=X
(X+Y)(X+Z)=X+YZ
X+XY=X+Y
XY + YZ +Y Z = XY +Z
Page 66
FUNDAMENTALS OF DIGITAL COMPUTERS
R.H.S = Y + X
L.H.S = R.H.S
Hence X + Y = Y + X is proved.
Logic circuit:
2. X . Y = Y . X
L.H.S = X . Y
R.H.S = Y . X
Page 67
FUNDAMENTALS OF DIGITAL COMPUTERS
L.H.S = R.H.S
Hence X . Y = Y . X is proved
Logic circuit:
R.H.S = (X + Y) + Z
Page 68
FUNDAMENTALS OF DIGITAL COMPUTERS
L.H.S = R.H.S
Hence X + (Y + Z) = (X + Y) +Z is proved.
Logic Circuit:
2. X (Y Z) = (X Y) Z
L.H.S = X (Y Z)
R.H.S = (X Y) Z
Page 69
FUNDAMENTALS OF DIGITAL COMPUTERS
L.H.S = R.H.S
Hence X(Y Z) = (X Y)Z is proved.
Logic Circuit:
Page 70
FUNDAMENTALS OF DIGITAL COMPUTERS
L.H.S
Page 71
FUNDAMENTALS OF DIGITAL COMPUTERS
R.H.S
L.H.S
R.H.S
Page 72
FUNDAMENTALS OF DIGITAL COMPUTERS
The basic duality of a Boolean algebra is deriving a Boolean algebra from another
Boolean algebra is,
1. Changing each OR sign to an AND sign
2. Changing each AND sign to an OR sign
3. Complementing 0 or 1 appearing in the expression
De Morgan’s theorem expresses a basic duality which underlies all Boolean
algebra.
For example,
X + 0 =X is the dual of X.1 = X
(X + Y) + Z = X + (Y + Z) is the dual of (XY)Z = X(YZ) and
2.1.7 COVERING AND COMBINATION:
The covering rule, where one term covers the condition of the other term so that
the other term becomes redundant, can be represented in dual form as,
X+XY =X
and X(X+Y) = X
The combining rules are,
XY + XY = X
And in its dual form (X+Y) (X+Y) = X
2.1.8 CONSENSUS THEOREM:
The consensus theorem finds a redundant term which is a consensus of two
other terms. The idea is that if the consensus term is true, then any of the other terms is
true and thus it becomes redundant. This can be expressed in dual form as,
In the first expression, BC is the consensus term and thus redundant. This is
because if BC= 1, then both B = 1 and C = 1 and any of the other two terms AB or AC
must be one as either A = 1 or A = 1.
Similarly, in the second expression, (B + C) is the consensus term and if this term
is 0 then both B = 0 and C = 0. This makes one of the other two sum terms 0 as either
A= 0 or A= 0.
Page 73
FUNDAMENTALS OF DIGITAL COMPUTERS
INTERCONNECTING GATES
The OR gates, AND gates and inverters can be interconnected to form gating or
logic networks.
The Boolean algebra expression corresponding to a given gating network can be
derived by systematically progressing from input on the gates.
It is the gating network with three inputs X, Y and Z and an output expression
(X.Y) + Z.
It is the gating network with two inputs X and Y and an output expression
(X.Y) + X.Y
Page 74
FUNDAMENTALS OF DIGITAL COMPUTERS
There are two methods widely used to convert the truth table to a logical
expression, they are
Sum of Product ( SOP)
Product of Sum (POS)
Page 75
FUNDAMENTALS OF DIGITAL COMPUTERS
The each fundamental product next to the input conditions producing a high
output.
For example,
A B is high when A and B are low; AB is high when A is low and B is high; and
so on. The fundamental products are also called minterms.
Products A' B', A'B, AB', AB are represented by m0, m1, m2, and m3 respectively.
The suffix i of mi comes from decimal equivalent of binary values that makes
corresponding product term high.
The idea of fundamental products applies to three or more input variables. For
example, assume three input variables: A, B, C and their complements. There are eight
ways to AND three input variables and their complements resulting in fundamental
products of
Page 76
FUNDAMENTALS OF DIGITAL COMPUTERS
The above three variable minterms can alternatively be represented by mo, m1,
m2, m3, m4, m5, m6, and m7 respectively.
To write the standard sop expression for the truth table, select the rows whose
output is 1.
For the first row Y=1 where A = 0 and B = 0 so A B = 1
Similarly, for the third row Y=1 where A = 1 and B = 0 so A B = 1
Hence the two standard products are A B and A B. These two standard products
are logically summed to give the SOP expression.
We can simplify using Boolean algebra rules,
Page 77
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 78
FUNDAMENTALS OF DIGITAL COMPUTERS
The cell numbered 0 represents min term (m0) A B and A=0, B=0
The cell numbered 1 represents min term (m1) A B and A=0, B=1
The cell numbered 2 represents min term (m2) A B and A=1, B=0
The cell numbered 3 represents min term (m3) A B and A=1, B=1
Truth Table
The map is filled by placing 1’s in the square or cells for each term which leads to
a 1 output.
The remaining two cells are filled with 0’s and we have to use 1’s for
simplification.
Hence the expression Y=∑ (2, 3)
Page 79
FUNDAMENTALS OF DIGITAL COMPUTERS
The binary combination for A is taken 0 and 1, for BC these are four possible
binary combinations 00, 01, 10, 11.
But instead of using normal binary progression gray code format is used that is
the BC combination is taken as 00, 01, 11 and 10.
So that we go from one cell to the next cell. This is only one code change in the
binary combination.
To fill the K-map, we have to collect the min terms for which the output Y=1.
Truth Table:
Page 80
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 81
FUNDAMENTALS OF DIGITAL COMPUTERS
PAIRS:
A pair is a group of two1’s which are horizontally or vertically adjacent.
Example:
QUAD:
Quad is a group of four 1’s which are horizontally or vertically adjacent.
Example:
OCTET:
An octet is a group of eight 1’s an octet element.
Example:
Page 82
FUNDAMENTALS OF DIGITAL COMPUTERS
REDUNDANT GROUP:
If all the elements are belongs to the other group that can be eliminated.
Example:
ROLLING OF GROUP:
An element which is common to more than one group is called rolling of group.
Example:
The subcube of two cells for the expression for m=2 a subcube has four adjacent
cells.
Page 83
FUNDAMENTALS OF DIGITAL COMPUTERS
Example:
Page 84
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 85
FUNDAMENTALS OF DIGITAL COMPUTERS
Page 86
FUNDAMENTALS OF DIGITAL COMPUTERS
This karnaugh map of the table of combination with D’s in the appropriate
places, a D may be used as either a 1 or 0.
So D’s are used to complete or enlarge the subcube whenever possible, otherwise
ignored.
Example:
Page 87
FUNDAMENTALS OF DIGITAL COMPUTERS
The minterm m4 and m5 can form a pair and give an expression A B C, but the
two don’t care D’s at cells 12 and 13 can be treated as 1’s then minterm m4, m5, m12,
m13 form a quad to give B C.
Similarly the 1’s in cells 2 and 3 and D’s in cells 10 and 11 form a quad to give
B C.
Hence the final result is,
Page 88
FUNDAMENTALS OF DIGITAL COMPUTERS
The first output 0 appears for A= 0, B = 0, and C = 0. The fundamental sum for
these inputs is A+ B + C. Because this produces an output zero for the corresponding
input condition:
Y=A+B+C = 0+0+0 = 0
The second output 0 appears for the input condition of A= 0, B = 1, and C = 1.
The fundamental sum for this is A + B + C. Notice that B and Care complemented
because this is the only way to get a logical sum of 0 for the given input conditions:
Y=A+B+C = 0+1+1 = 0+0+0 = 0
Similarly, the third output 0 occurs for A = l, B = 1, and C = 0; therefore, its fundamental
sum is A + B + C:
Y=A+B+C = 1+1+0 = 0+0+0 = 0
To get the product-of-sums equation, all we have to do is AND the fundamental
sums:
Y = (A+ B + C) (A + B + C) (A + B + C)
Logic Circuit
The logic circuit for the product of sum expression is
Page 89
FUNDAMENTALS OF DIGITAL COMPUTERS
A B Y
0 0 1
0 1 0
1 0 1
1 1 0
To write the standard POS expression for the truth table, select the rows whose
output is 0.
For the second row Y = 0 where A = 0 and B = 1 so A + B =0
Similarly, for the fourth row Y = 0 where A = 1 and B =1 so A + B = 0
Hence the two standard max terms are A + B and A + B. These two standard sum
terms are logically multiplied to give the POS expression.
We can simplify using Boolean algebra rules,
Page 90
FUNDAMENTALS OF DIGITAL COMPUTERS
Sum of Products
To write the standard SOP expression for the truth table, select the rows whose
output is 1.
SOP expression is
Products of sum
To write the standard POS expression for the truth table, select the rows whose
output is 0.
POS expression is
Page 91