EC3352 Digital Systems Design Lecture Notes 1
EC3352 Digital Systems Design Lecture Notes 1
EC3352 Digital Systems Design Lecture Notes 1
com
EC3352 DSD IIYR/III SEM R2021 MSAJCE/ECE
LECTURE NOTES
INTRODUCTION:
In 1854, George Boole, an English mathematician, proposed algebra for
symbolically representing problems in logic so that they may be analyzed
mathematically. The mathematical systems founded upon the work of Boole are called
Boolean algebra in his honor.
The application of a Boolean algebra to certain engineering problems was
introduced in 1938 by C.E. Shannon.
For the formal definition of Boolean algebra, we shall employ the
postulates formulated by E.V. Huntington in 1904.
e* x = x * e = x
Eg: 0+ 0 = 0 0+1=1+0=1 a) x+ 0= x
1.1=1 1.0=0.1=1 b) x. 1 = x
Eg: 0+ 1 = 1+ 0 = 1 a) x+ y= y+ x
0.1=1.0=0 b) x. y= y. x
v) Inverse:
A set S having the identity element e, w.r.t. binary operator * is said to have an
inverse, whenever for every x Є S, there exists an element x’ Є S such that,
x. x’ Є e
a) x+ x’ = 1, since 0 + 0’ = 0+ 1 and 1+ 1’ = 1+ 0 = 1
b) x. x’ = 1, since 0 . 0’ = 0. 1 and 1. 1’ = 1. 0 = 0
Summary:
Postulates of Boolean algebra:
Basic Theorems:
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. The proofs of the
theorems with one variable are presented below. At the right is listed the number of the
postulate that justifies each step of the proof.
1) a) x+ x = x
x+ x = (x+ x) . 1------------------- by postulate 2(b) [ x. 1 = x ]
= (x+ x). (x+ x’)------------------- 5(a) [ x+ x’ = 1]
= x+ xx’------------------- 4(b) [ x+yz = (x+y)(x+z)]
= x+ 0------------------- 5(b) [ x. x’ = 0 ]
= x------------------- 2(a) [ x+0 = x ]
b) x. x = x
x. x = (x. x) + 0------------------- by postulate 2(a) [ x+ 0 = x ]
= (x. x) + (x. x’)------------------- 5(b) [ x. x’ = 0]
= x ( x+ x’)------------------- 4(a) [ x (y+z) = (xy)+ (xz)]
= x (1)------------------- 5(a) [ x+ x’ = 1 ]
= x------------------- 2(b) [ x.1 = x ]
2) a) x+ 1 = 1
x+ 1 = 1 . (x+ 1)------------------- by postulate 2(b) [ x. 1 = x ]
= (x+ x’). (x+ 1)------------------- 5(a) [ x+ x’ = 1]
= x+ x’.1------------------- 4(b) [ x+yz = (x+y)(x+z)]
= x+ x’------------------- 2(b) [ x. 1 = x ]
= 1------------------- 5(a) [ x+ x’= 1]
b) x .0 = 0
3) (x’)’ = x
From postulate 5, we have x+ x’ = 1 and x. x’ = 0, which defines the
complement of x. The complement of x’ is x and is also (x’)’.
Therefore, since the complement is unique,
(x’)’ = x.
4) Absorption Theorem:
a) x+ xy = x
b) x. (x+ y) = x
x. (x+ y) = x. x+ x. y------------------- 4(a) [ x (y+z) = (xy)+ (xz)]
= x + x.y------------------- by theorem 1(b) [x. x = x]
= x.------------------- by theorem 4(a) [x+ xy = x]
c) x+ x’y = x+ y
x+ x’y = x+ xy+ x’y------------------- by theorem 4(a) [x+ xy = x]
= x+ y (x+ x’)------------------- by postulate 4(a) [ x (y+z) = (xy)+ (xz)]
= x+ y (1)------------------- 5(a) [x+ x’ = 1]
= x+ y------------------- 2(b) [x. 1= x]
d) x. (x’+y) = xy
x. (x’+y) = x.x’+ xy------------------- by postulate 4(a) [ x (y+z) = (xy)+ (xz)]
= 0+ xy------------------- 5(b) [x. x’ = 0]
= xy.------------------- 2(a) [x+ 0= x]
x+ y = y+ x
x. y = y. x
This means that the order of the AND operation conducted on the variables makes
no difference.
2. Associative property:
A+ (B+ C) = (A+B) + C
The OR operation of several variables results in the same, regardless of the grouping
of the variables.
The associative law of multiplication is given by,
A. (B. C) = (A.B) . C
It makes no difference in what order the variables are grouped during the AND
operation of several variables.
3. Distributive property:
A+ BC = (A+B) (A+C)
4. Duality:
Summary:
Theorems of Boolean algebra:
DeMorgan’s Theorems:
Two theorems that are an important part of Boolean algebra were proposed by
DeMorgan.
The first theorem states that the complement of a product is equal to the sum of
the complements.
(AB)’ = A’+ B’
The second theorem states that the complement of a sum is equal to the product of
the complements.
Consensus Theorem:
In simplification of Boolean expression, an expression of the form AB+ A’C+ BC,
the term BC is redundant and can be eliminated to form the equivalent expression AB+
A’C. The theorem used for this simplification is known as consensus theorem and is
stated as,
BOOLEAN FUNCTIONS:
Minimization of Boolean Expressions:
The Boolean expressions can be simplified by applying properties, laws
and theorems of Boolean algebra.
1. x (x’+y)
= xx’+ xy [ x. x’= 0 ]
= 0 + xy [ x+ 0 = x ]
= xy.
2. x+ x’y
= x + xy + x’y [ x+ xy= x]
= x+ y (x+x’)
= x+ y (1) [ x+ x’ = 1]
= x+ y.
4. xy + x’z + yz.
= xy + x’z + yz( x+ x’) [ x+ x’= 1]
= xy + x’z + xyz + x’yz
Re-arranging,
= xy + xyz + x’z +x’yz
= xy (1+ z) + x’z (1+y) [1+y= 1]
= xy+ x’z.
8. x+ xy’+ x’y
= x (1+ y’)+ x’y
= x (1) + x’y [ 1+ x = 1 ]
= x+ x’y [ x+ x’y = x+ y ]
= x+ y.
= xy ( 1 ) [ 1+ x = 1 ]
= xy.
12. xy+ xyz+ xyz’+ x’yz
= xy ( 1+ z+ z’)+ x’yz
= xy ( 1 ) + x’yz [ 1+ x = 1 ]
= xy+ x’yz
= y ( x+ x’z ) [ x+ x’y = x+ y]
= y ( x+ z ).
10
11
28. Y= ∑m (1, 3, 5, 7)
= x’y’z+ x’yz+ xy’z+ xyz
= x’z( y’+y) + xz( y’+y)
= x’z (1)+ xz (1) [ x+ x’= 1]
= x’z+ xz
= z( x’+ x)
= z (1) [ x+ x’= 1]
= z.
12
COMPLEMENT OF A FUNCTION:
The complement of a function F is F’ and is obtained from an interchange of 0’s
for 1’s and 1’s for 0’s in the value of F. The complement of a function may be derived
algebraically through DeMorgan’s theorem.
DeMorgan’s theorems for any number of variables resemble in form the two-
variable case and can be derived by successive substitutions similar to the method used
in the preceding derivation. These theorems can be generalized as –
(A+B+C+D+…+F)’=A’B’C’D’…F’
1. F= x’yz’+ x’y’z
F’= (x’yz’+ x’y’z)’
= (x”+ y’+ z”) . (x”+ y”+z’)
= (x+ y’+ z). (x+ y+ z’).
13
3. F= x (y’z’+ yz)
F’= [x (y’z’+ yz)]’
= x’+ (y’z’+ yz)’
= x’+ (y’z’)’. (yz)’
= x’+ (y”+ z”) . (y’+ z’)
= x’+ (y+ z) . (y’+ z’).
4. F= xy’+ x’y
F’= (xy’+ x’y)’
= (xy’)’. (x’y)’
= (x’+y) (x+y’)
= x’x+ x’y’+ yx+ yy’
= x’y’+ xy.
14
x y z mi Mi
0 0 0 x’y’z’ = m0 x+ y+ z= M0
0 0 1 x’y’z = m1 x+ y+ z’= M1
0 1 0 x’yz’ = m2 x+ y’+ z= M2
0 1 1 x’yz = m3 x+ y’+ z’= M3
1 0 0 xy’z’ = m4 x’+ y+ z= M4
1 0 1 xy’z = m5 x’+ y+ z’= M5
1 1 0 xyz’ = m6 x’+ y’+ z= M6
1 1 1 xyz = m7 x’+ y’+ z’= M7
15
16
= ∑m (4, 5, 6, 7).
3. Y(A,B,C)=A+BC
= A. (B+ B’). (C+ C’)+(A+ A’). BC
= (AB+ AB’). (C+ C’)+ ABC+ A’BC
= ABC+ ABC’+ AB’C+ AB’C’+ ABC+ A’BC
= ABC+ ABC’+ AB’C+ AB’C’+ A’BC
= m7+ m6+ m5+ m4+ m3
= ∑m (3, 4, 5, 6, 7).
17
3. Y= A. (B+ C+ A)
= (A+ B.B’+ C.C’). (A+ B+ C)
= (A+B+C) (A+B+C’) (A+B’+C) (A+ B’+C’) (A+B+C)
= (A+B+C) (A+B+C’) (A+B’+C) (A+ B’+C’)
= M0. M1. M2. M3
= ∏M (0, 1, 2, 3)
4. Y= (A+B’) (B+C) (A+C’)
= (A+B’+C.C’) (B+C+ A.A’) (A+C’+ B.B’)
= (A+B’+C) (A+B’+C’) (A+B+C) (A’+B+C) (A+B+C’) (A+B’+C’)
= (A+B’+C) (A+B’+C’) (A+B+C) (A’+B+C) (A+B+C’)
= M2. M3. M0. M4. M1
= ∏M (0, 1, 2, 3, 4)
5. Y= xy+ x’z
= (xy+ x’) (xy+ z)Using distributive law, convert the function into OR terms.
= (x+x’) (y+x’) (x+z) (y+z) [x+ x’=1]
= (x’+y) (x+z) (y+z)
= (x’+y+ z.z’) (x+z+y.y’) (y+z+ x.x’)
= (x’+ y+ z) (x’+ y+ z’) (x+ y+ z) (x+ y’+ z) (x+ y+ z) (x’+ y+ z)
= (x’+ y+ z) (x’+ y+ z’) (x+ y+ z) (x+ y’+ z)
18
19
Product terms are assigned to the cells of a K-map by labeling each row and each
column of a map with a variable, with its complement or with a combination of variables
& complements. The below figure shows the way to label the rows & columns of a 1, 2, 3
and 4- variable maps and the product terms corresponding to each cell.
It is important to note that when we move from one cell to the next along any row
or from one cell to the next along any column, one and only one variable in the product
term changes (to a complement or to an uncomplemented form). Irrespective of number
of variables the labels along each row and column must conform to a single change.
Hence gray code is used to label the rows and columns of K-map as shown ow.
The grouping is nothing but combining terms in adjacent cells. The simplification
is achieved by grouping adjacent 1’s or 0’s in groups of 2i, where i = 1, 2, …, n and n is
the number of variables. When adjacent 1’s are grouped then we get result in the sum of
product form; otherwise we get result in the product of sum form.
20
Examples of Pairs
Grouping Four Adjacent 1’s: (Quad)
In a Karnaugh map we can group four adjacent 1’s. The resultant group is called
Quad. Fig (a) shows the four 1’s are horizontally adjacent and Fig (b) shows they are
vertically adjacent. Fig (c) contains four 1’s in a square, and they are considered adjacent
to each other.
21
Examples of Quads
The four 1’s in fig (d) and fig (e) are also adjacent, as are those in fig (f) because,
the top and bottom rows are considered to be adjacent to each other and the leftmost
and rightmost columns are also adjacent to each other.
22
4. Check for quads and octets of adjacent 1’s even if it contains some 1’s that have
already been encircled. While doing this make sure that there are minimum
number of groups.
5. Combine any pairs necessary to include any 1’s that have not yet been
grouped.
6. Form the simplified expression by summing product terms of all the groups.
F = yz+ xz’
F = z’+ xy’
3. F=A’C+A’B+AB’C+BC
Soln:
= A’C (B+ B’) + A’B (C+ C’) + AB’C + BC (A+ A’)
= A’BC+ A’B’C + A’BC + A’BC’ + AB’C + ABC + A’BC
= A’BC+ A’B’C + A’BC’ + AB’C + ABC
= m3+ m1+ m2+ m5+ m7
23
= ∑ m (1, 2, 3, 5, 7)
F=C+A’B
F=A’C+B’
24
Therefore,
F= y’+ w’z’+ xz’
3. F= A’B’C’+ B’CD’+ A’BCD’+ AB’C’
= A’B’C’ (D+ D’) + B’CD’ (A+ A’) + A’BCD’+ AB’C’ (D+ D’)
= A’B’C’D+ A’B’C’D’+ AB’CD’+ A’B’CD’+ A’BCD’+ AB’C’D+ AB’C’D’
= m1+ m0+ m10+ m2+ m6+ m9+ m8
= ∑ m (0, 1, 2, 6, 8, 9, 10)
Therefore,
F= B’D’+ B’C’+ A’CD’.
25
Therefore,
Y= AB+ AC+ AD’.
Therefore,
Y= AB+ AC+ AD+BCD.
26
In the above K-map, the cells 5, 7, 13 and 15 can be grouped to form a quad as
indicated by the dotted lines. In order to group the remaining 1’s, four pairs have to be
formed. However, all the four 1’s covered by the quad are also covered by the pairs. So,
the quad in the above k-map is redundant.
Therefore, the simplified expression will be,
Y = A’C’D+ A’BC+ ABD+ ACD.
27
1. Y= (A+ B+ C’) (A+ B’+ C’) (A’+ B’+ C’) (A’+ B+ C) (A+ B+ C)
= M1. M3. M7. M4. M0
=∏ M (0, 1, 3, 4, 7)
= ∑ m (2, 5, 6)
28
2. Y= (A’+ B’+ C+ D) (A’+ B’+ C’+ D) (A’+ B’+ C’+ D’) (A’+ B+ C+ D) (A+ B’+ C’+ D)
(A+ B’+ C’+ D’) (A+ B+ C+ D) (A’+ B’+ C+ D’)
= M12. M14. M15. M8. M6. M7. M0. M13
= ∏M (0, 6, 7, 8, 12, 13, 14, 15)
Y’ = B’C’D’+ AB+ BC
Y= Y” = (B’C’D’+ AB+ BC)’
= (B’C’D’)’. (AB)’. (BC)’
= (B”+ C”+D”). (A’+B’). (B’+ C’)
= (B+ C+ D). (A’+ B’). (B’+ C’)
Therefore, Y= (B+ C+ D). (A’+ B’). (B’+ C’)
29
Y’ = BD’+ CD+ AB
30
F (x, y, z) = 1
F (w, x, y, z) = w’x’+ yz
31
32
Thus, every row on one map is adjacent to the corresponding row (the one
occupying the same position) on the other map, as are corresponding columns. Also,
the rightmost and leftmost columns within each 16- cell map are adjacent, just as
they are in any 16- cell map, as are the top and bottom rows.
33
2. F (A, B, C, D, E) = ∑m (0, 5, 6, 8, 9, 10, 11, 16, 20, 24, 25, 26, 27, 29, 31)
Soln:
3. F (A, B, C, D, E) = ∑m ( 1, 4, 8, 10, 11, 20, 22, 24, 25, 26)+∑d (0, 12, 16, 17)
Soln:
34
5. F (x1, x2, x3, x4, x5) = ∑m (2, 3, 6, 7, 11, 12, 13, 14, 15, 23, 28, 29, 30, 31 )
Soln:
35
6. F (x1, x2, x3, x4, x5) = ∑m (1, 2, 3, 6, 8, 9, 14, 17, 24, 25, 26, 27, 30, 31 )+ ∑d (4, 5)
Soln:
F (x1, x2, x3, x4, x5) = x2x3’x4’+ x2x3x4x5’+ x3’x4’x5+ x1x2x4+ x1’x2’x3x5’+ x1’x2’x3’x4
LOGIC GATES
BASIC LOGIC GATES:
Logic gates are electronic circuits that can be used to implement the most
elementary logic expressions, also known as Boolean expressions. The logic gate is the
most basic building block of combinational logic.
There are three basic logic gates, namely the OR gate, the AND gate and the NOT
gate. Other logic gates that are derived from these basic gates are the NAND gate, the
NOR gate, the EXCLUSIVE- OR gate and the EXCLUSIVE-NOR gate.
36
UNIVERSAL GATES:
The NAND and NOR gates are known as universal gates, since any logic
function can be implemented using NAND or NOR gates. This is illustrated in
the following sections.
a) NAND Gate:
The NAND gate can be used to generate the NOT function, the AND function,
37
iii) OR function:
By simply inverting inputs of the NAND gate. i.e.,
38
iv)NOR function:
By inverting inputs and outputs of the NAND gate.
b) NOR Gate:
Similar to NAND gate, the NOR gate is also a universal gate, since it can be used
to generate the NOT, AND, OR and NAND functions.
i) NOT function:
By connecting all the inputs together and creating a single common input.
39
ii) OR function:
By simply inverting output of the NOR gate. i.e.,
Truth table
40
Original Circuit:
41
Soln:
NAND Circuit:
42
gate.
Adding bubbles on the output of each AND gates and on the inputs of each OR
43
44
Sequential logic circuit comprises both logic gates and the state of storage
elements such as flip-flops. As a consequence, the output of a sequential circuit depends
not only on present value of inputs but also on the past state of inputs.
In the previous chapter, we have discussed binary numbers, codes, Boolean
algebra and simplification of Boolean function and logic gates. In this chapter, formulation
and analysis of various systematic designs of combinational circuits will be discussed.
DESIGN PROCEDURE:
Any combinational circuit can be designed by the following steps of design procedure.
1. The problem is stated.
2. Identify the input and output variables.
3. The input and output variables are assigned letter symbols.
4. Construction of a truth table to meet input -output requirements.
5. Writing Boolean expressions for various output variables in terms of
input variables.
6. The simplified Boolean expression is obtained by any method of minimization—
algebraic method, Karnaugh map method, or tabulation method.
7. A logic diagram is realized from the simplified boolean expression using
logic gates.
The following guidelines should be followed while choosing the preferred form
for hardware implementation:
1. The implementation should have the minimum number of gates, with the
gates used having the minimum number of inputs.
2. There should be a minimum number of interconnections.
3. Limitation on the driving capability of the gates should not be ignored.
Half-Adder:
A half-adder is a combinational circuit that can be used to add two binary bits. It
has two inputs that represent the two bits to be added and two outputs, with one
producing the SUM output and the other producing the CARRY.
Inputs Outputs
A B Carry (C) Sum (S)
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Truth table of half-adder
The Boolean expressions for the SUM and CARRY outputs are given by the
equations,
Sum, S = A’B+ AB’= A B
Carry, C = A . B
The first one representing the SUM output is that of an EX-OR gate, the second
one representing the CARRY output is that of an AND gate.
The logic diagram of the half adder is,
Full-Adder:
A full adder is a combinational circuit that forms the arithmetic sum of three
input bits. It consists of 3 inputs and 2 outputs.
Two of the input variables, represent the significant bits to be added. The third
input represents the carry from previous lower significant position. The block
diagram of full adder is given by,
The full adder circuit overcomes the limitation of the half-adder, which can be used
to add two bits only. As there are three input variables, eight different input combinations
are possible. The truth table is shown below,
Truth Table:
Inputs Outputs
A B Cin Sum (S) Carry (Cout)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
To derive the simplified Boolean expression from the truth table, the Karnaugh map
method is adopted as,
The Boolean expressions for the SUM and CARRY outputs are given by the
equations,
Sum, S = A’B’Cin+ A’BC’in + AB’C’in + ABCin
Carry, Cout = AB+ ACin + BCin .
The logic diagram of the full adder can also be implemented with two half-
adders and one OR gate. The S output from the second half adder is the exclusive-OR of
Cin and the output of the first half-adder, giving
Half -Subtractor:
A half-subtractor is a combinational circuit that can be used to subtract one binary
digit from another to produce a DIFFERENCE output and a BORROW output. The
BORROW output here specifies whether a ‗1‘ has been borrowed to perform the
subtraction.
The Boolean expressions for the DIFFERENCE and BORROW outputs are given by
the equations,
Difference, D = A’B+ AB’= A B
Borrow, Bout = A’ . B
Comparing a half-subtractor with a half-adder, we find that the expressions for the
SUM and DIFFERENCE outputs are just the same. The expression for BORROW in the
case of the half-subtractor is also similar to what we have for CARRY in the case of the
half-adder. If the input A, ie., the minuend is complemented, an AND gate can beused
to implement the BORROW output.
Full Subtractor:
A full subtractor performs subtraction operation on two bits, a minuend and a
subtrahend, and also takes into consideration whether a ‗1‘ has already been borrowed
by the previous adjacent lower minuend bit or not.
As a result, there are three bits to be handled at the input of a full subtractor,
namely the two bits to be subtracted and a borrow bit designated as B in. There are two
outputs, namely the DIFFERENCE output D and the BORROW output Bo. The
BORROW output bit tells whether the minuend bit needs to borrow a ‗1‘ from the next
possible higher minuend bit.
Block schematic of full-adder
The Boolean expressions for the DIFFERENCE and BORROW outputs are given
by the equations,
Difference, D = A’B’Bin+ A’BB’in + AB’B’in + ABBin
Borrow, Bout = A’B+ A’Cin + BBin .
The logic diagram for the above functions is shown as,
The logic diagram of the full-subtractor can also be implemented with two half-
subtractors and one OR gate. The difference,D output from the second half subtractor
is the exclusive-OR of Bin and the output of the first half-subtractor, giving
Difference,D= Bin (A B) [x y = x‘y+ xy‘]
= Bin (A‘B+AB‘)
= B‘in (A‘B+AB‘) + Bin (A‘B+AB‘)‘ [(x‘y+xy‘)‘= (xy+x‘y‘)]
= B‘in (A‘B+AB‘) + Bin (AB+A‘B‘)
= A‘BB‘in + AB‘B‘in + ABBin + A‘B‘Bin
. and the borrow output is,
Therefore,
we can implement full-subtractor using two half-subtractors and OR gate as,
10
Since all the bits of augend and addend are fed into the adder circuits
simultaneously and the additions in each position are taking place at the same time, this
circuit is known as parallel adder.
The bits are added with full adders, starting from the least significant position, to
form the sum it and carry bit. The input carry C0 in the least significant position must be
0. The carry output of the lower order stage is connected to the carry input of the next
higher order stage. Hence this type of adder is called ripple-carry adder.
In the least significant stage, A0, B0 and C0 (which is 0) are added resulting in sum
S0 and carry C1. This carry C1 becomes the carry input to the second stage. Similarly in
the second stage, A1, B1 and C1 are added resulting in sum S 1 and carry C2, in the third
stage, A2, B2 and C2 are added resulting in sum S 2 and carry C3, in the third stage, A3, B3 and
C3 are added resulting in sum S3 and C4, which is the output carry. Thus the circuit
results in a sum (S3S2S1S0) and a carry output (Cout).
Though the parallel binary adder is said to generate its output immediately after
the inputs are applied, its speed of operation is limited by the carry propagation delay
11
through all stages. However, there are several methods to reduce this delay.
One of the methods of speeding up this process is look-ahead carry addition which
eliminates the ripple-carry delay.
12
Full-Adder circuit
13
Since the Boolean function for each output carry is expressed in sum of products,
each function can be implemented with one level of AND gates followed by an OR gate.
The three Boolean functions for C 1, C2 and C3 are implemented in the carry look-ahead
generator as shown below. Note that C3 does not have to wait for C2 and C1 to propagate;
in fact C3 is propagated at the same time as C1 and C2.
Logic diagram of Carry Look-ahead Generator
Using a Look-ahead Generator we can easily construct a 4-bit parallel adder with
a Look-ahead carry scheme. Each sum output requires two exclusive-OR gates. The
output of the first exclusive-OR gate generates the Pi variable, and the AND gate generates
the Gi variable. The carries are propagated through the carry look-ahead generator and
applied as inputs to the second exclusive-OR gate. All output carries are generated after a
delay through two levels of gates. Thus, outputs S 1 through S3 have equal propagation
delay times.
14
15
The circuit for subtracting A-B consists of an adder with inverters placed between
each data input B and the corresponding input of the full adder. The input carry C0 must
be equal to 1 when performing subtraction. The operation thus performed becomes A,
plus the 1‘s complement of B, plus1. This is equal to A plus the 2‘s complement of B.
The mode input M controls the operation. When M= 0, the circuit is an adder and
when M=1, the circuit becomes a Subtractor. Each exclusive-OR gate receives input M
16
and one of the inputs of B. When M=0, we have B 0= B. The full adders receive the
value of B, the input carry is 0, and the circuit performs A plus B. When M=1, we have B
1= B‘ and C0=1. The B inputs are all complemented and a 1 is added through the input
carry. The circuit performs the operation A plus the 2‘s complement of B. The exclusive-
OR with output V is for detecting an overflow.
17
0 1 0 1 0 1 0 0 0 0 10
0 1 0 1 1 1 0 0 0 1 11
0 1 1 0 0 1 0 0 1 0 12
0 1 1 0 1 1 0 0 1 1 13
0 1 1 1 0 1 0 1 0 0 14
0 1 1 1 1 1 0 1 0 1 15
1 0 0 0 0 1 0 1 1 0 16
1 0 0 0 1 1 0 1 1 1 17
1 0 0 1 0 1 1 0 0 0 18
1 0 0 1 1 1 1 0 0 1 19
In examining the contents of the table, it is apparent that when the binary sum is
equal to or less than 1001, the corresponding BCD number is identical, and therefore no
conversion is needed. When the binary sum is greater than 9 (1001), we obtain a non-
valid BCD representation. The addition of binary 6 (0110) to the binary sum converts it
to the correct BCD representation and also produces an output carry as required.
The logic circuit to detect sum greater than 9 can be determined by simplifying
the boolean expression of the given truth table.
18
The two decimal digits, together with the input carry, are first added in the top4-
bit binary adder to provide the binary sum. When the output carry is equal to zero,
nothing is added to the binary sum. When it is equal to one, binary 0110 is added to
the binary sum through the bottom 4-bit adder. The output carry generated from the
bottom adder can be ignored, since it supplies information already available at the
output carry terminal. The output carry from one stage must be connected to the input
carry of the next higher-order stage.
Binary Multiplier:
Multiplication of binary numbers is performed in the same way as in decimal
numbers. The multiplicand is multiplied by each bit of the multiplier starting from the
least significant bit. Each such multiplication forms a partial product. Such partial
19
products are shifted one position to the left. The final product is obtained from the sum
of partial products.
Consider the multiplication of two 2-bit numbers. The multiplicand bits are B1 and
B0, the multiplier bits are A 1 and A0, and the product is C3, C2, C1 and C0. The first partial
product is formed by multiplying A 0 by B1B0. The multiplication of two bits such as A0 and
B0 produces a 1 if both bits are 1; otherwise, it produces a 0. This is identicalto an AND
operation. Therefore the partial product can be implemented with AND gates as shown
in the diagram below.
The second partial product is formed by multiplying A 1 by B1B0 and shifted one
position to the left. The two partial products are added with two half adder (HA) circuits.
2-bit by 2-bit Binary multiplier
Usually there are more bits in the partial products and it is necessary to use full
adders to produce the sum of the partial products. The least significant bit of the product
does not have to go through an adder since it is formed by the output of thefirst AND
gate.
A combinational circuit binary multiplier with more bits can be constructed in a
similar fashion. A bit of the multiplier is ANDed with each bit of the multiplicand in as
many levels as there are bits in the multiplier. The binary output in each level of AND
gates are added with the partial product of the previous level to form a new partial
product. The last level produces the product. For J multiplier bits and K multiplicand bits
we need (J x K) AND gates and (J-1) k-bit adders to produce a product of J+K bits.
Consider a multiplier circuit that multiplies a binary number of four bits by a
number of three bits. Let the multiplicand be represented by B3, B2, B1, B0 and the
multiplier by A2, A1, and A0. Since K= 4 and J= 3, we need 12 AND gates and two 4-bit
adders to produce a product of seven bits. The logic diagram of the multiplier is shown
below.
20
21
The message including the parity is transmitted and then checked at the receiving
end for errors. An error is detected if the checked parity does not correspond with the one
transmitted. The circuit that generates the parity bit in the transmitter is called a parity
generator and the circuit that checks the parity in the receiver is called a parity checker.
Parity Generator:
A parity generator is a combination logic system to generate the parity bit at the
transmitting side. A table illustrates even parity as well as odd parity for a message
consisting of three bits.
If the message bit combination is designated as A, B, C and Pe, Po are the even
and odd parity respectively, then it is obvious from table that the boolean expressions
of even parity and odd parity are
Pe = A (B C) and
Po = (A B C)′.
K-map Simplification:
22
Logic Diagram:
Parity Checker:
The message bits with the parity bit are transmitted to their destination, where
they are applied to a parity checker circuit. The circuit that checks the parity at the
receiver side is called the parity checker. The parity checker circuit produces a check bit
and is very similar to the parity generator circuit. If the check bit is 1, then it is assumed
that the received data is incorrect. The check bit will be 0 if the received data is correct.
The table shows the truth table for the even parity checker.
23
K-map Simplification:
PEC= A’B’ (C’D+ CD’) + A’B (C’D’+ CD) + AB (C’D+ CD’) + AB’ (C’D’+ CD)
= A’B’ (C D) + A’B (C D)’ + AB (C D) + AB’ (C D)’
= (A’B’+ AB) (C D) + (A’B+ AB’) (C D)’
= (A B)’ (C D) + (A B) (C D)’
= (A B) (C D)
Logic Diagram:
MAGNITUDE COMPARATOR:
24
For comparison of two n-bit numbers, the classical method to achieve the
Boolean expressions requires a truth table of 22n entries and becomes too lengthy and
cumbersome.
Inputs Outputs
A3 A2 A1 A0 A>B A=B A<B
0 0 0 0 0 1 0
0 0 0 1 0 0 1
0 0 1 0 0 0 1
0 0 1 1 0 0 1
0 1 0 0 1 0 0
0 1 0 1 0 1 0
0 1 1 0 0 0 1
0 1 1 1 0 0 1
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 0 1 0
1 0 1 1 0 0 1
1 1 0 0 1 0 0
1 1 0 1 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 1 0
K-map Simplification:
25
Logic Diagram:
26
Let us consider the two binary numbers A and B with four digits each. Write
the coefficient of the numbers in descending order as,
A = A3A2A1A0
B = B3 B 2 B 1 B 0 ,
Each subscripted letter represents one of the digits in the number. It is observed from the
bit contents of two numbers that A = B when A 3 = B3, A2 = B2, A1 = B1 and A0 = B0. When the
numbers are binary they possess the value of either 1 or 0, the equality relation of each
pair can be expressed logically by the equivalence function as
Xi = AiBi + Ai′Bi′ for i = 1, 2, 3, 4.
Or, Xi = (A B)′. or, Xi ′ = A B
Or, Xi = (AiBi′ + Ai′Bi)′.
27
where,
Xi =1 only if the pair of bits in position i are equal (ie., if both are 1 or both are 0).
To satisfy the equality condition of two numbers A and B, it is necessary that all
Xi must be equal to logic 1. This indicates the AND operation of all Xi variables. In other
words, we can write the Boolean expression for two equal 4-bit numbers.
(A = B) = X3X2X1 X0.
The binary variable (A=B) is equal to 1 only if all pairs of digits of the two numbers
are equal.
To determine if A is greater than or less than B, we inspect the relative magnitudes
of pairs of significant bits starting from the most significant bit. If the two digits of the
most significant position are equal, the next significant pair of digits is compared. The
comparison process is continued until a pair of unequal digits is found. It may be
concluded that A>B, if the corresponding digit of A is 1 and B is 0. If the corresponding
digit of A is 0 and B is 1, we conclude that A<B. Therefore, we can derive the logical
expression of such sequential comparison by the following two Boolean functions,
The symbols (A>B) and (A<B) are binary output variables that are equal to 1 when
A>B or A<B, respectively.
The gate implementation of the three output variables just derived is simpler
than it seems because it involves a certain amount of repetition. The unequal outputs
can use the same gates that are needed to generate the equal output. The logic
diagram of the 4-bit magnitude comparator is shown below,
28
The four x outputs are generated with exclusive-NOR circuits and applied to
an AND gate to give the binary output variable (A=B). The other two outputs use the
x variables to generate the Boolean functions listed above. This is a multilevel
implementation and has a regular pattern.
29
CODE CONVERTERS:
A code converter is a logic circuit that changes data presented in one type of
binary code to another code of binary code. The following are some of the most
commonly used code converters:
i. Binary-to-Gray code
ii. Gray-to-Binary code
iii. BCD-to-Excess-3
iv. Excess-3-to-BCD
v. Binary-to-BCD
vi. BCD-to-binary
vii. Gray-to-BCD
viii. BCD-to-Gray
ix. 8 4 -2 -1 to BCD converter
30
K-map simplification:
Now, the above expressions can be implemented using EX-OR gates as,
31
Logic Diagram:
Truth table:
Gray code Binary code
G3 G2 G1 G0 B3 B2 B1 B0
0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 0 0 0 1 1
0 0 1 1 0 0 1 0
0 1 0 0 0 1 1 1
0 1 0 1 0 1 1 0
0 1 1 0 0 1 0 0
0 1 1 1 0 1 0 1
1 0 0 0 1 1 1 1
1 0 0 1 1 1 1 0
1 0 1 0 1 1 0 0
1 0 1 1 1 1 0 1
1 1 0 0 1 0 0 0
1 1 0 1 1 0 0 1
1 1 1 0 1 0 1 1
1 1 1 1 1 0 1 0
From the truth table, the logic expression for the binary code outputs can be written as,
G3= ∑m (8, 9, 10, 11, 12, 13, 14, 15)
G2= ∑m (4, 5, 6, 7, 8, 9, 10, 11)
G1= ∑m (2, 3, 4, 5, 8, 9, 14, 15)
G0= ∑m (1, 2, 4, 7, 8, 11, 13, 14)
32
K-map Simplification:
33
Now, the above expressions can be implemented using EX-OR gates as,
Truth Table:
B3 B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 0 0 1 1
1 0 0 0 1 0 1 0 0
2 0 0 1 0 0 1 0 1
3 0 0 1 1 0 1 1 0
4 0 1 0 0 0 1 1 1
5 0 1 0 1 1 0 0 0
6 0 1 1 0 1 0 0 1
7 0 1 1 1 1 0 1 0
8 1 0 0 0 1 0 1 1
9 1 0 0 1 1 1 0 0
From the truth table, the logic expression for the Excess-3 code outputs can be
written as,
E3= ∑m (5, 6, 7, 8, 9) + ∑d (10, 11, 12, 13, 14, 15)
E2= ∑m (1, 2, 3, 4, 9) + ∑d (10, 11, 12, 13, 14, 15)
E1= ∑m (0, 3, 4, 7, 8) + ∑d (10, 11, 12, 13, 14, 15)
E0= ∑m (0, 2, 4, 6, 8) + ∑d (10, 11, 12, 13, 14, 15)
34
K-map Simplification:
35
Logic Diagram:
4. Excess-3 to BCD
36
From the truth table, the logic expression for the Excess-3 code outputs can be
written as,
B3= ∑m (11, 12) + ∑d (0, 1, 2, 13, 14, 15)
B2= ∑m (7, 8, 9, 10) + ∑d (0, 1, 2, 13, 14, 15)
B1= ∑m (5, 6, 9, 10) + ∑d (0, 1, 2, 13, 14, 15)
B0= ∑m (4, 6, 8, 10, 12) + ∑d (0, 1, 2, 13, 14, 15)
K-map Simplification:
Now, the above expressions the logic diagram can be implemented as,
37
Logic Diagram:
The left-most four-bit group represents 10 and right-most four-bit group represents 9.
The binary representation for decimal 19 is 1910 = 110012.
38
K-map Simplification:
39
40
A= B0
B= B1B4‘+ B1’B4
= B1 B4
E= B4B3 + B4B2B1
Now, from the above expressions the logic diagram can be implemented as,
Logic Diagram:
41
42
From the truth table, the logic expression for the BCD code outputs can be written as,
B0= ∑m (1, 3, 5, 7, 9, 11, 13, 15)
B1= ∑m (2, 3, 6, 7, 12, 13)
B2= ∑m (4, 5, 6, 7, 14, 15)
B3= ∑m (8, 9)
B4= ∑m (10, 11, 12, 13, 14, 15)
K-map Simplification:
43
Logic Diagram:
44
Truth Table:
Gray Code BCD Code
G3 G2 G1 G0 B4 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 1
0 0 1 1 0 0 0 1 0
0 0 1 0 0 0 0 1 1
0 1 1 0 0 0 1 0 0
0 1 1 1 0 0 1 0 1
0 1 0 1 0 0 1 1 0
0 1 0 0 0 0 1 1 1
1 1 0 0 0 1 0 0 0
45
1 1 0 1 0 1 0 0 1
1 1 1 1 1 0 0 0 0
1 1 1 0 1 0 0 0 1
1 0 1 0 1 0 0 1 0
1 0 1 1 1 0 0 1 1
1 0 0 1 1 0 1 0 0
1 0 0 0 1 0 1 0 1
K-map Simplification:
46
From the above K-map, the logical expression can be obtained as,
B0= (G0 G1) (G2 G3)
B1= G’2G1+ G’3G2G’1
B2= G’3G2+ G3G’2G’1
B3= G3G2G’1
B4= G3G’2+ G3G1
Now, from the above expressions the logic diagram can be implemented as,
Logic Diagram:
47
48
0 1 0 0 0 1 1 0
0 1 0 1 0 1 1 1
0 1 1 0 0 1 0 1
0 1 1 1 0 1 0 0
1 0 0 0 1 1 0 0
1 0 0 1 1 1 0 1
K-map Simplification:
Now, from the above expressions the logic diagram can be implemented as,
Logic Diagram:
49
9. 8 4 -2 -1 to BCD Converter:
The truth table for 8 4 -2 -1 to BCD converter can be written as,
Truth Table:
Gray Code BCD Code
D C B A B4 B3 B2 B1 B0
0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 1
0 1 1 0 0 0 0 1 0
0 1 0 1 0 0 0 1 1
0 1 0 0 0 0 1 0 0
1 0 1 1 0 0 1 0 1
1 0 1 0 0 0 1 1 0
1 0 0 1 0 0 1 1 1
1 0 0 0 0 1 0 0 0
1 1 1 1 0 1 0 0 1
1 1 1 0 1 0 0 0 0
1 1 0 1 1 0 0 0 1
1 1 0 0 1 0 0 1 0
50
K-map Simplification:
From the above K-map, the logical expression can be obtained as,
51
B0 = A
B1= A’B’CD+ (A B) (C’+D’)
B2= D’CB’A’+ C’ (A+B)
B3= D (ABC+ A’B’C’)
B4= CD ( A’+B’)
Logic Diagram:
52
DECODERS:
A decoder is a combinational circuit that converts binary information from ‗n‘
input lines to a maximum of ‗2n‘ unique output lines. The general structure of
decoder circuit is –
53
Here the 2 inputs are decoded into 4 outputs, each output representing one of the
minterms of the two input variables.
Inputs Outputs
Enable A B Y3 Y2 Y1 Y0
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
As shown in the truth table, if enable input is 1 (EN= 1) only one of the outputs
(Y0 – Y3), is active for a given input.
The output Y0 is active, ie., Y0= 1 when inputs A= B= 0,
Y1 is active when inputs, A= 0 and B= 1,
Y2 is active, when input A= 1 and B= 0,
Y3 is active, when inputs A= B= 1.
Inputs Outputs
A B C Y0 Y1 Y2 Y3 Y4 Y5 Y6 Y7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
54
55
Each segment is made up of a material that emits light when current is passed
through it. The segments activated during each digit display are tabulated as—
0 a, b, c, d, e, f
1 b, c
2 a, b, d, e, g
3 a, b, c, d, g
4 b, c, f, g
5 a, c, d, f, g
56
Truth table:
57
K-map Simplification:
58
Logic Diagram:
59
Applications of decoders:
1. Decoders are used in counter system.
2. They are used in analog to digital converter.
3. Decoder outputs can be used to drive a display system.
60
ENCODERS:
An encoder is a digital circuit that performs the inverse operation of a decoder.
Hence, the opposite of the decoding process is called encoding. An encoder is a
combinational circuit that converts binary information from 2n input lines to a maximum
of ‗n‘ unique output lines.
The general structure of encoder circuit is –
It has 2n input lines, only one which 1 is active at any time and ‗n‘ output lines. It
encodes one of the active inputs to a coded binary output with ‗n‘ bits. In an encoder, the
number of outputs is less than the number of inputs.
Octal-to-Binary Encoder:
It has eight inputs (one for each of the octal digits) and the three outputs that
generate the corresponding binary number. It is assumed that only one input has a value
of 1 at any given time.
Inputs Outputs
D0 D1 D2 D3 D4 D5 D6 D7 A B C
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
The encoder can be implemented with OR gates whose inputs are determined
directly from the truth table. Output z is equal to 1, when the input octal digit is 1 or 3
or 5 or 7. Output y is 1 for octal digits 2, 3, 6, or 7 and the output is 1 for digits 4, 5, 6 or
7. These conditions can be expressed by the following output Boolean
61
Octal-to-Binary Encoder
Another problem in the octal-to-binary encoder is that an output with all 0‘s is
generated when all the inputs are 0; this output is same as when D 0 is equal to 1. The
discrepancy can be resolved by providing one more output to indicate that atleast one
input is equal to 1.
Priority Encoder:
A priority encoder is an encoder circuit that includes the priority function. In
priority encoder, if two or more inputs are equal to 1 at the same time, the input having
the highest priority will take precedence.
In addition to the two outputs x and y, the circuit has a third output, V (valid bit
indicator). It is set to 1 when one or more inputs are equal to 1. If all inputs are 0, there
is no valid input and V is equal to 0.
62
The higher the subscript number, higher the priority of the input. Input D3, has the
highest priority. So, regardless of the values of the other inputs, when D 3 is 1, the output
for xy is 11.
D2 has the next priority level. The output is 10, if D2= 1 provided D3= 0. Theoutput
for D1 is generated only if higher priority inputs are 0, and so on down the priority levels.
Truth table:
Inputs Outputs
D0 D1 D2 D3 x y V
0 0 0 0 x x 0
1 0 0 0 0 0 1
x 1 0 0 0 1 1
x x 1 0 1 0 1
x x x 1 1 1 1
Although the above table has only five rows, when each don‘t care condition is
replaced first by 0 and then by 1, we obtain all 16 possible input combinations. For
example, the third row in the table with X100 represents minterms 0100 and 1100. The
don‘t care condition is replaced by 0 and 1 as shown in the table below.
Inputs Outputs
D0 D1 D2 D3 x y V
0 0 0 0 x x 0
1 0 0 0 0 0 1
0 1 0 0
0 1 1
1 1 0 0
0 0 1 0
0 1 1 0
1 0 1
1 0 1 0
1 1 1 0
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
63
K-map Simplification:
64
A multiplexer or MUX, is a combinational circuit with more than one input line, one
output line and more than one selection line. A multiplexer selects binary information
present from one of many input lines, depending upon the logic status of the selection
inputs, and routes it to the output line. Normally, there are 2 n input lines and n selection
lines whose bit combinations determine which input is selected. The multiplexer is often
labeled as MUX in block diagrams.
A multiplexer is also called a data selector, since it selects one of many inputs and
steers the binary information to the output line.
Logic diagram
The multiplexer acts like an electronic switch that selects one of the two sources.
Truth table:
Y
I0
I1
65
4-to-1-line Multiplexer:
A 4-to-1-line multiplexer has four (2 n) input lines, two (n) select lines and one
output line. It is the multiplexer consisting of four input channels and information of one
of the channels can be selected and transmitted to an output line according to the select
inputs combinations. Selection of one of the four input channel is possible by two selection
inputs.
Each of the four inputs I0 through I3, is applied to one input of AND gate. Selection
lines S1 and S0 are decoded to select a particular AND gate. The outputs of the AND gate
are applied to a single OR gate that provides the 1-line output.
4-to-1-Line Multiplexer
Function table:
S1 S0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
To demonstrate the circuit operation, consider the case when S 1S0= 10. The AND
gate associated with input I2 has two of its inputs equal to 1 and the third input connected
to I2. The other three AND gates have atleast one input equal to 0, which makes their
outputs equal to 0. The OR output is now equal to the value of I2, providinga path from
the selected input to the output.
66
67
This circuit has four multiplexers, each capable of selecting one of two input lines.
Output Y0 can be selected to come from either A0 or B0. Similarly, output Y1 may have the
value of A1 or B1, and so on. Input selection line, S selects one of the lines in each of the
four multiplexers. The enable input E must be active for normal operation.
Although the circuit contains four 2-to-1-Line multiplexers, it is viewed as a circuit
that selects one of two 4-bit sets of data lines. The unit is enabled when E= 0. Then if S=
0, the four A inputs have a path to the four outputs. On the other hand, ifS=1, the four
B inputs are applied to the outputs. The outputs have all 0‘s when E= 1, regardless of the
value of S.
Application:
The multiplexer is a very useful MSI function and has various ranges of
applications in data communication. Signal routing and data communication are the
important applications of a multiplexer. It is used for connecting two or more sources to
guide to a single destination among computer units and it is useful for constructing a
common bus system. One of the general properties of a multiplexer is that Boolean
functions can be implemented by this device.
Implementation table:
Apply variables A and B to the select lines. The procedures for implementing the
function are:
68
Multiplexer Implementation:
69
2. F (x, y, z) = ∑m (1, 2, 6, 7)
Solution:
Implementation table:
Multiplexer Implementation:
3. F ( A, B, C) = ∑m (1, 2, 4, 5)
Solution:
Variables, n= 3 (A, B, C)
Select lines= n-1 = 2 (S1, S0)
2n-1 to MUX i.e., 22 to 1 = 4 to 1 MUX
Input lines= 2n-1 = 22 = 4 (D0, D1, D2, D3)
Implementation table:
70
Multiplexer Implementation:
Solution:
Variables, n= 4 (P, Q, R, S)
Select lines= n-1 = 3 (S2, S1, S0)
2n-1 to MUX i.e., 23 to 1 = 8 to 1 MUX
Input lines= 2n-1 = 23 = 8 (D0, D1, D2, D3, D4, D5, D6, D7)
Implementation table:
71
Multiplexer Implementation:
5. Implement the Boolean function using 8: 1 and also using 4:1 multiplexer
F (A, B, C, D) = ∑m (0, 1, 2, 4, 6, 9, 12, 14)
Solution:
Variables, n= 4 (A, B, C, D)
Select lines= n-1 = 3 (S2, S1, S0)
2n-1 to MUX i.e., 23 to 1 = 8 to 1 MUX
Input lines= 2n-1 = 23 = 8 (D0, D1, D2, D3, D4, D5, D6, D7)
Implementation table:
72
Using 4: 1 MUX:
73
Solution:
Variables, n= 4 (A, B, C, D)
Select lines= n-1 = 3 (S2, S1, S0)
2n-1 to MUX i.e., 23 to 1 = 8 to 1 MUX
Input lines= 2n-1 = 23 = 8 (D0, D1, D2, D3, D4, D5, D6, D7)
Implementation table:
Multiplexer Implementation:
74
Implementation table:
Multiplexer Implementation:
75
Multiplexer Implementation:
9. Implement the Boolean function using 8: 1 and also using 4:1 multiplexer
F (w, x, y, z) = ∑m (1, 2, 3, 6, 7, 8, 11, 12, 14)
Solution:
Variables, n= 4 (w, x, y, z)
Select lines= n-1 = 3 (S2, S1, S0)
76
Implementation table:
77
Implementation table:
78
Multiplexer Implementation:
79
Multiplexer Implementation:
12. An 8×1 multiplexer has inputs A, B and C connected to the selection inputs S2,
S1, and S0 respectively. The data inputs I0 to I7 are as follows
I1=I2=I7= 0; I3=I5= 1; I0=I4= D and I6= D'.
Determine the Boolean function that the multiplexer implements.
Multiplexer Implementation:
80
Implementation table:
DEMULTIPLEXER:
Demultiplex means one into many. Demultiplexing is the process of taking
information from one input and transmitting the same over one of several outputs.
A demultiplexer is a combinational logic circuit that receives information on a
single input and transmits the same information over one of several (2n) output lines.
81
1-to-4 Demultiplexer:
A 1-to-4 demultiplexer has a single input, Din, four outputs (Y0 to Y3) and
two select inputs (S1 and S0).
Logic Symbol
The input variable Din has a path to all four outputs, but the input information
is directed to only one of the output lines. The truth table of the 1-to-4 demultiplexer is
shown below.
Enable S1 S0 Din Y0 Y1 Y2 Y3
0 x x x 0 0 0 0
1 0 0 0 0 0 0 0
1 0 0 1 1 0 0 0
1 0 1 0 0 0 0 0
1 0 1 1 0 1 0 0
1 1 0 0 0 0 0 0
1 1 0 1 0 0 1 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 1
From the truth table, it is clear that the data input, Din is connected to the
output Y0, when S1= 0 and S0= 0 and the data input is connected to output Y1 when S1=
0 and S0= 1. Similarly, the data input is connected to output Y2 and Y3 when S1= 1 and
S0= 0 and when S1= 1 and S0= 1, respectively. Also, from the truth table, the expression
for outputs can be written as follows,
82
Y0= S1’S0’Din
Y1= S1’S0Din
Y2= S1S0’Din
Y3= S1S0Din
1-to-8 Demultiplexer:
A 1-to-8 demultiplexer has a single input, Din, eight outputs (Y0 to Y7) and
three select inputs (S2, S1 and S0). It distributes one input line to eight output lines
based on the select inputs. The truth table of 1-to-8 demultiplexer is shown below.
Din S2 S1 S0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 x x x 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 0 0 1 0
1 0 1 0 0 0 0 0 0 1 0 0
83
1 0 1 1 0 0 0 0 1 0 0 0
1 1 0 0 0 0 0 1 0 0 0 0
1 1 0 1 0 0 1 0 0 0 0 0
1 1 1 0 0 1 0 0 0 0 0 0
1 1 1 1 1 0 0 0 0 0 0 0
Truth table of 1-to-8 demultiplexer
From the above truth table, it is clear that the data input is connected with one of
the eight outputs based on the select inputs. Now from this truth table, the expression
for eight outputs can be written as follows:
Y0= S2‘S1‘S0‘Din Y4= S2 S1‘S0‘Din
Y1= S2‘S1‘S0Din Y5= S2 S1‘S0Din
Y2= S2‘S1S0‘Din Y6= S2 S1S0‘Din
Y3= S2‘S1S0Din Y7= S2S1S0Din
Now using the above expressions, the logic diagram of a 1-to-8 demultiplexer can be
drawn as shown below. Here, the single data line, D in is connected to all the eight AND
gates, but only one of the eight AND gates will be enabled by the select input lines. For
example, if S2S1S0= 000, then only AND gate-0 will be enabled and thereby the data input,
Din will appear at Y0. Similarly, the different combinations of the select inputs, the input
Din will appear at the respective output.
84
85
Inputs Outputs
A B Bin Difference(D) Borrow(Bout)
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
86
INTRODUCTION
In combinational logic circuits, the outputs at any instant of time depend only
on the input signals present at that time. For a change in input, the output occurs
immediately.
Thus in sequential circuits, the output variables depend not only on the
present input variables but also on the past history of input variables.
The rotary channel selected knob on an old-fashioned TV is like a
combinational. Its output selects a channel based only on its current input – the
position of the knob. The channel-up and channel-down push buttons on a TV is like
a sequential circuit. The channel selection depends on the past sequence of up/down
pushes.
3.3 LATCHES:
Latches and Flip-Flops are the basic building blocks of the most sequential
circuits. Latches are used for a sequential device that checks all of its inputs
continuously and changes its outputs accordingly at any time independent of clocking
signal. Enable signal is provided with the latch. When enable signal is active output
changes occur as the input changes. But when enable signal is not activated input
changes do not affect the output.
Flip-Flop is used for a sequential device that normally samples its inputs and
changes its outputs only at times determined by clocking signal.
3.3.1 SR Latch:
The simplest type of latch is the set-reset (SR) latch. It can be constructed from
either two NOR gates or two NAND gates.
Before going to analyse the SR latch, we recall that a logic 1 at any input of a
NOR gate forces its output to a logic 0. Let us understand the operation of this circuit
for various input/ output possibilities.
Case 1: S= 0 and R= 0
Initially, Q= 1 and Q’= 0
Let us assume that initially Q=1 and Q’=0. With Q’=0, both inputs to NORgate
1 are at logic 0. So, its output, Q is at logic 1. With Q=1, one input of NOR gate 2 is at
logic
1. Hence its output, Q’ is at logic 0. This shows that when S and R both are
low, the output does not change.
Case 2: S= 0 and R= 1
In this case, R input of the NOR gate 1 is at logic 1, hence its output, Q is at logic 0.
Both inputs to NOR gate 2 are now at logic 0. So that its output, Q’ is at logic 1.
Case 3: S= 1 and R= 0
In this case, S input of the NOR gate 2 is at logic 1, hence its output, Q is at logic 0.
Both inputs to NOR gate 1 are now at logic 0. So that its output, Q is at logic 1.
Case 4: S= 1 and R= 1
When R and S both are at logic 1, they force the outputs of both NOR gates to
the low state, i.e., (Q=0 and Q’=0). So, we call this an indeterminate or prohibited
state, and represent this condition in the truth table as an asterisk (*). This condition
also violates the basic definition of a latch that requires Q to be complement of Q’.
Thus in normal operation this condition must be avoided by making sure that 1’s are
not applied to both the inputs simultaneously.
We can summarize the operation of SR latch as follows:
• When S= 0 and R= 0, the output, Qn+1 remains in its present state, Qn.
• When S= 0 and R= 1, the latch is reset to 0.
• When S= 1 and R= 0, the latch is set to 1.
• When S= 1 and R= 1, the output of both gates will produce 0.
i.e., Qn+1= Qn+1’= 0.
Logic Symbol
Gated SR Latch:
In the SR latch, the output changes occur immediately after the input
changes i.e, the latch is sensitive to its S and R inputs all the time.
A latch that is sensitive to the inputs only when an enable input is active.
Such a latch with enable input is known as gated SR latch.
• The circuit behaves like SR latch when EN= 1. It retains its previous state
when EN= 0
1 1 0 0 1
Set
1 1 0 1 1
1 1 1 0 x Indeterminate
1 1 1 1 x *
0 x x 0 0
No Change (NC)
0 x x 1 1
When S is HIGH and R is LOW, a HIGH on the EN input sets the latch. When S is
LOW and R is HIGH, a HIGH on the EN input resets the latch.
3.3.2 D Latch
In SR latch, when both inputs are same (00 or 11), the output either does not
change or it is invalid. In many practical applications, these input conditions are not
required. These input conditions can be avoided by making them complement of each
other. This modified SR latch is known as D latch.
As shown in the figure, D input goes directly to the S input, and its complement
is applied to the R input. Therefore, only two input conditions exists, either S=0 and
R=1 or S=1 and R=0. The truth table for D latch is shown below.
EN D Qn Qn+1 State
1 0 x 0 Reset
1 1 x 1 Set
0 x x Qn No Change (NC)
As shown in the truth table, the Q output follows the D input. For this reason,
D latch is called transparent latch.
When D is HIGH and EN is HIGH. Q goes HIGH. When D is LOW and EN is
HIGH, Q goes LOW. When EN is LOW, the state of the latch is not affected by the D
input.
Flip-Flops are different from latches. Flip-Flops are pulse or clock edge
triggered instead of level triggered.
Flip-Flops are synchronous bistable devices (has two outputs Q and Q’). In this
case, the term synchronous means that the output changes state only at aspecified
point on the triggering input called the clock (CLK), i.e., changes in the output occur
in synchronization with the clock.
An edge-triggered Flip-Flop changes state either at the positive edge (rising
edge) or at the negative edge (falling edge) of the clock pulse and is sensitive to its
inputs only at this transition of the clock. The different types of edge-triggered Flip-
Flops are—
• S-R Flip-Flop,
• J-K Flip-Flop,
• D Flip-Flop,
• T Flip-Flop.
Although the S-R Flip-Flop is not available in IC form, it is the basis for the D
and J-K Flip-Flops. Each type can be either positive edge-triggered (no bubble at C
data on these inputs are transferred to the Flip-Flop's output only on the triggering
edge of the clock pulse. The circuit is similar to SR latch except enable signal is
replaced by clock pulse (CLK). On the positive edge of the clock pulse, the circuit
responds to the S and R inputs.
SR Flip-Flop
When S is HIGH and R is LOW, the Q output goes HIGH on the triggering edge
of the clock pulse, and the Flip-Flop is SET. When S is LOW and R is HIGH, theQ
output goes LOW on the triggering edge of the clock pulse, and the Flip-Flop is RESET.
When both S and R are LOW, the output does not change from its prior state. An
invalid condition exists when both S and R are HIGH.
1 1 1 0 x Indeterminate
1 1 1 1 x *
0 x x 0 0
No Change (NC)
0 x x 1 1
Truth table for SR Flip-Flop
JK Flip Flop
The data input J and the output Q’ are applied o the first AND gate and its
output (JQ’) is applied to the S input of SR Flip-Flop. Similarly, the data input K and
the output Q are applied to the second AND gate and its output (KQ) is applied to
the R input of SR Flip-Flop.
J=K=0
When J=K= 0, both AND gates are disabled. Therefore clock pulse have no
effect, hence the Flip-Flop output is same as the previous output.
J=0,K=1
When J= 0 and K= 1, AND gate 1 is disabled i.e., S= 0 and R= 1. This condition
will reset the Flip-Flop to 0.
J=1,K=0
When J= 1 and K= 0, AND gate 2 is disabled i.e., S= 1 and R= 0. Therefore the
Flip-Flop will set on the application of a clock pulse.
J=K=0
When J=K= 1, it is possible to set or reset the Flip-Flop. If Q is High, AND gate
2 passes on a reset pulse to the next clock. When Q is low, AND gate 1 passes on a
set pulse to the next clock. Eitherway, Q changes to the complement of the last state
i.e., toggle. Toggle means to switch to the opposite state. The truth table of JK Flip-
Flop is given below.
Inputs Output
CLK State
J K Qn+1
1 0 0 Qn No Change
1 0 1 0 Reset
1 1 0 1 Set
1 1 1 Qn’ Toggle
K-map Simplification:
3.5.3 D Flip-Flop:
Like in D latch, in D Flip-Flop the basic SR Flip-Flop is used with complemented
inputs. The D Flip-Flop is similar to D-latch except clock pulse is used instead of
enable input.
D Flip-Flop
1 0 0 Reset
1 1 1 Set
0 x Qn No Change
Truth table for D Flip-Flop
Looking at the truth table for D Flip-Flop we can realize that Qn+1
function follows the D input at the positive going edges of the clock pulses.
Qn D Qn+1
0 0 0
0 1 1
1 0 0
1 1 1
Characteristic table
3.5.4 T Flip-Flop
The T (Toggle) Flip-Flop is a modification of the JK Flip-Flop. It is obtained
from JK Flip-Flop by connecting both inputs J and K together, i.e., single input.
Regardless of the present state, the Flip-Flop complements its output when the clock
pulse occurs while input T= 1.
T Flip-Flop
When T= 0, Qn+1= Qn, ie., the next state is the sameas the present state and no
change occurs.
When T= 1, Qn+1= Qn’,ie., the next state is the complement of the present state.
T Qn+1 State
0 QnN o Change
1 Qn’Toggle
Logic diagram
When the clock pulse has a positive edge, the master acts according to its J-K
inputs, but the slave does not respond, since it requires a negative edge at the clock
input.
When the clock input has a negative edge, the slave Flip-Flop copies the
master outputs. But the master does not respond since it requires a positive edge at
its clock input.
The clocked master-slave J-K Flip-Flop using NAND gates is shown below.
Master-Slave JK Flip-Flop
3.6.1 SR Flip-Flop:
Present Next
Inputs
State State Present Next
Inputs Inputs
Qn S R Qn+1 State State
0 0 0 0 Qn Qn+1 S R S R
0 0 1 0 0 0 0 0
0 1 0 1 0 x
0 0 0 1
0 1 1 x
0 1 1 0 1 0
1 0 0 1
1 0 0 1 0 1
1 0 1 0
1 1 0 0
1 1 0 1 x 0
1 1 1 0
1 1 1 x
Modified Table
Characteristic Table
Present Next
Inputs
State State
Qn Qn+1 S R
0 0 0 x
0 1 1 0
1 0 0 1
1 1 x 0
Excitation Table
The above table presents the excitation table for SR Flip-Flop. It consists of present
state (Qn), next state (Qn+1) and a column for each input to show how the required
transition is achieved.
There are 4 possible transitions from present state to next state. The required
Input conditions for each of the four transitions are derived from the information
available in the characteristic table. The symbol ‘x’ denotes the don’t care condition,
it does not matter whether the input is 0 or 1.
3.6.2 JK Flip-Flop:
Present Next Present Next
Inputs Inputs Inputs
State State State State
Qn J K Qn+1 Qn Qn+1 J K J K
0 0 0 0 0 0 0 0
0 0 1 0 0 x
0 0 0 1
0 1 0 1
0 1 1 0
0 1 1 1
1 x
1 0 0 1 0 1 1 1
1 0 1 0 1 0 0 1
x 1
1 1 0 1 1 0 1 1
1 1 1 0 1 1 0 0
x 0
1 1 1 0
Present Next
Inputs
State State
Qn Qn+1 J K
0 0 0 x
0 1 1 x
1 0 x 1
1 1 x 0
Excitation Table
3.6.3 D Flip-Flop
3.6.4 T Flip-Flop
Present Next
Input
State State Present Next
Input
Qn T Qn+1 State State
0 0 0 Qn Qn+1 T
0 1 1 0 0 0
1 0 1 0 1 1
1 1 0 1 0 1
1 1 0
Characteristic Table
Modified Table
D Flip-Flop
JK Flip-Flop
JK Flip-Flop to D Flip-Flop
The excitation table for the above conversion is
Flip-Flop
Input Present state Next state
Inputs
D Qn Qn+1 J K
0 0 0 0 x
0 1 0 x 1
1 0 1 1 x
1 1 1 x 0
D Flip-Flop to T Flip-Flop
The excitation table for the above conversion is
Flip-Flop
Input Present state Next state
Input
T Qn Qn+1 D
0 0 0 0
0 1 1 1
1 0 1 1
1 1 0 0
T Flip-Flop to D Flip-Flop
The excitation table for the above conversion is
Flip-Flop
Input Present state Next state
Input
D Qn Qn+1 T
0 0 0 0
0 1 0 1
1 0 1 1
1 1 1 0
• Mealy model: The output depends on both the present state of the Flip-Flops
and on the inputs.
Moore model
Mealy model
In case of Moore circuit, the directed lines are labeled with only one binary number
representing the state of the input that causes the state transition. The output state is
indicated within the circle, below the present state because output state depends only
on present state and not on the input.
State diagram for Mealy circuit State diagram for Moore circuit
In case of Moore circuit, the output section has only one column since output
does not depend on input.
Next state Output
Present state
X= 0 X= 1 Y
AB AB AB
a a c 0
b b a 0
c d c 1
d b d 0
2. Write the excitation input functions for each Flip-Flop and also write the
Moore/ Mealy output equations.
3. Substitute the excitation input functions into the bistable equations for
the Flip-Flops to obtain the next state output equations.
4. Obtain the state table and reduced form of the state table.
5. Draw the state diagram by using the second form of the state table.
State table:
To obtain the next-state values of a sequential circuit with JK Flip-Flops, use
the JK Flip-Flop characteristics table.
x= 0 x= 1 x= 0 x= 1
A B A B A B y y
0 0 0 1 1 1 0 0
0 1 1 0 1 0 0 1
1 0 0 1 0 0 0 0
1 1 0 0 0 0 0 0
Second form of state table
State Diagram:
State Diagram
2. A sequential circuit with two ‘D’ Flip-Flops A and B, one input (x) and one
output (y). the Flip-Flop input functions are:
DA= Ax+ Bx
DB= A’xand the circuit output function is,
Y= (A+ B) x’.
(a) Draw the logic diagram of the circuit,
(b) Tabulate the state table,
(c) Draw the state diagram.
Soln:
State Table:
Present state Input Flip-Flop Inputs Next state Output
DA=
A B x DB= A’x A(t+1) B(t+1) Y= (A+B)x’
Ax+Bx
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 0 0 0 0 1
0 1 1 1 1 1 1 0
1 0 0 0 0 0 0 1
1 0 1 1 0 1 0 0
1 1 0 0 0 0 0 1
1 1 1 1 0 1 0 0
A B A B A B Y Y
0 0 0 0 0 1 0 0
0 1 0 0 1 1 1 0
1 0 0 0 1 0 1 0
1 1 0 0 1 0 1 0
Second form of state table
State Diagram:
3. Analyze the synchronous Mealy machine and obtain its state diagram.
Soln:
The given synchronous Mealy machine consists of two D Flip-Flops, one inputs and
one output.
The Flip-Flop input functions are,
DA= Y1’Y2X’
DB= X+ Y1’Y2
The circuit output function is, Z= Y1Y2X
State Table:
Y1 Y2 Y1 Y2 Y1 Y2 Z Z
0 0 0 0 0 1 0 0
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 0
1 1 0 0 0 1 0 1
Second form of state table
State Diagram:
4. A sequential circuit has two JK Flop-Flops A and B, two inputs x and y and
one output z. The Flip-Flop input equation and circuit output equations are
JA = Bx + B' y' KA = B' xy'
JB = A' x KB = A+ xy'
z = Ax' y' + Bx' y'
State diagram:
State table:
To obtain the next-state values of a sequential circuit with JK Flip-Flop, use
the JK Flip-Flop characteristic table,
Present
Input Flip-Flop Inputs Next state Output
state
JA= KA= JB= KB=
A B x y A(t+1) B(t+1) z
Bx+B’y’ B’xy’ A’x A+xy’
0 0 0 0 1 0 0 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 1 1 1 1 1 0
0 0 1 1 0 0 1 0 0 1 0
0 1 0 0 0 0 0 0 0 0 1
0 1 0 1 0 0 0 0 0 0 0
0 1 1 0 1 0 1 1 1 1 0
0 1 1 1 1 0 1 0 1 1 0
1 0 0 0 1 0 0 1 1 0 1
1 0 0 1 0 0 0 1 1 0 0
1 0 1 0 1 1 0 1 0 0 0
1 0 1 1 0 0 0 1 1 0 0
1 1 0 0 0 0 0 1 1 0 1
1 1 0 1 0 0 0 1 1 0 0
1 1 1 0 1 0 0 1 1 0 0
1 1 1 1 1 0 0 1 1 0 0
State Equation:
5. A sequential circuit has two JK Flip-Flop A and B. the Flip-Flop input functions
are: JA= B JB= x’
The output function is not given in the problem. The output of the Flip-Flops
may be considered as the output of the circuit.
State table:
To obtain the next-state values of a sequential circuit with JK Flip-Flop, use
the JK Flip-Flop characteristic table.
Next state
X= 0 X= 1
A B A B A B
0 0 0 1 0 0
0 1 1 1 1 0
1 0 1 1 1 0
1 1 0 0 1 1
State Diagram:
Soln:
Using the assigned variable Y1 and Y2 for the two JK Flip-Flops, we can write
the four excitation input equations and the Moore output equation as follows:
State table:
Present state Input Flip-Flop Inputs Next state Output
Y2
Y1 Y2 X JA= Y2X KA= Y2’ JB= X KB= X’ Y1 (t+1) (t+1) Z= Y1Y2’
0 0 0 0 1 0 1 0 0 0
0 0 1 0 1 1 0 0 1 0
0 1 0 0 0 0 1 0 0 0
0 1 1 1 0 1 0 1 1 0
1 0 0 0 1 0 1 0 0 1
1 0 1 0 1 1 0 0 1 1
1 1 0 0 0 0 1 1 0 0
1 1 1 1 0 1 0 1 1 0
Here the output depends on the present state only and is independent of the
input. The two values inside each circle separated by a slash are for the present state
and output.
7. A sequential circuit has two T Flip-Flop A and B. The Flip-Flop input functions
are:
TA= Bx TB = x
y= AB
(a) Draw the logic diagram of the circuit,
(b) Tabulate the state table,
(c) Draw the state diagram.
Soln:
Logic diagram:
State table
Present state Input Flip-Flop Inputs Next state Output
A B x TA= Bx TB = x A (t+1) B (t+1) y= AB
0 0 0 0 0 0 0 0
0 0 1 0 1 0 1 0
0 1 0 0 0 0 1 0
0 1 1 1 1 1 0 0
1 0 0 0 0 1 0 0
1 0 1 0 1 1 1 0
1 1 0 0 0 1 1 1
1 1 1 1 1 0 0 1
A B A B A B y y
0 0 0 0 0 1 0 0
0 1 0 1 1 0 0 0
1 0 1 0 1 1 0 0
1 1 1 1 0 0 1 1
State Diagram:
State diagram
The state diagram for the reduced table consists of only four states and is shown
below.
1. Reduce the number of states in the following state table and tabulate the reduced
state table.
Next state Output
Present state
X= 0 X= 1 X= 0 X= 1
a a b 0 0
b c d 0 0
c a d 0 0
d e f 0 1
e a f 0 1
f g f 0 1
g a f 0 1
Soln:
From the above state table e and g generate exactly same next state and same
output for every possible set of inputs. The state e and g go to next states a and f and
have outputs 0 and 1 for x=0 and x=1 respectively. Therefore state g can be removed
and replaced by e.
The reduced state table-1 is shown below.
Now states d and f are equivalent. Both states go to the same next state (e, f)
and have same output (0, 1). Therefore one state can be removed; f is replaced by d.
The final reduced state table-2 is shown below.
Next state
Present state
X= 0 X= 1
1 1, 0 1, 0
2 1, 1 6, 1
3 4, 0 5, 0
4 1, 1 7, 0
5 2, 0 3, 0
6 4, 0 5, 0
7 2, 0 3, 0
Soln:
From the above state table, 5 and 7 generate exactly same next state and same
output for every possible set of inputs. The state 5 and 7 go to next states 2 and 3 and
have outputs 0 and 0 for x=0 and x=1 respectively. Therefore state 7 can be removed
and replaced by 5.
Similarly, 3 and 6 generate exactly same next state and same output for
every possible set of inputs. The state 3 and 6 go to next states 4 and 5 and have
outputs 0 and 0 for x=0 and x=1 respectively. Therefore state 6 can be removed and
replaced by 3.
The final reduced state table is shown below.
Next state Output
Present state
X= 0 X= 1 X= 0 X= 1
1 1 1 0 0
2 1 3 1 1
3 4 5 0 0
4 1 5 1 0
5 2 3 0 0
Reduced state table
Soln:
From the above state table, A and D generate exactly same next state and same
output for every possible set of inputs. The state A and D go to next states D and C
and have outputs 0 and 1 for x=0 and x=1 respectively. Therefore state D can be
removed and replaced by A. Similarly, C and F generate exactly same next state and
same output for every possible set of inputs. The state C and F go to next states H and
D and have outputs 1 and 1 for x=0 and x=1 respectively. Therefore state F can be
removed and replaced by C.
The reduced state table-1 is shown below.
From the above reduced state table-1, A and G generate exactly same next
state and same output for every possible set of inputs. The state A and G go to next
states A and C and have outputs 0 and 1 for x=0 and x=1 respectively. Therefore state
G can be removed and replaced by A. The final reduced state table-2 is shown below.
Next state Output
Present state
X= 0 X= 1 X= 0 X= 1
A A C 0 1
B E A 1 1
C H A 1 1
E B A 0 1
H C A 0 1
I A H 1 1
Reduced state table-2
Thus 9 states are reduced into 6 states.
Soln:
Now states d and f are equivalent. Both states go to the same next state (e, f)
and have same output (0, 1). Therefore one state can be removed; f is replaced by d.
The final reduced state table-2 is shown below.
Flip-Flop Application
JK General Applications
D Applications requiring transfer of
data
T (Ex: Shift Registers)
Application involving
complementation (Ex:
Binary Counters)
Present Next
Inputs
State State
Qn Qn+1 J K
0 0 0 x
0 1 1 x
1 0 x 1
1 1 x 0
Excitation table for JK Flip-Flop
Present Next
Input
State State
Qn Qn+1 T
0 0 0
0 1 1
1 0 1
1 1 0
Excitation table for T Flip-Flop
Present Next
Input
State State
Qn Qn+1 D
0 0 0
0 1 1
1 0 0
1 1 1
Excitation table for D Flip-Flop
3.11.3 Problems
1. A sequential circuit has one input and one output. The state diagram is shown
below. Design the sequential circuit with a) D-Flip-Flops, b) T Flip-Flops, c) RS
Flip-Flops and d) JK Flip-Flops.
Solution:
State Table:
The state table for the state diagram is,
State reduction:
As seen from the state table there is no equivalent states. Therefore,
no reduction in the state diagram.
The state table shows that circuit goes through four states, therefore we
require 2 Flip-Flops (number of states= 2m, where m= number of Flip-Flops). Since
two Flip-Flops are required first is denoted as A and second is denoted as B.
Flip-Flop
Present state Input Next state Output
Inputs
D
A B X A B A DB Y
0 0 0 0 0 0 0 0
0 0 1 1 0 1 0 1
0 1 0 1 1 1 1 0
0 1 1 0 0 0 0 0
1 0 0 1 0 1 0 1
1 0 1 0 1 0 1 0
1 1 0 0 0 0 0 1
1 1 1 1 0 1 0 0
K-map Simplification:
With these Flip-Flop input functions and circuit output function we can draw
the logic diagram as follows.
Flip-Flop
Present state Input Next state Output
Inputs
A B X A B TA TB Y
0 0 0 0 0 0 0 0
0 0 1 1 0 1 0 1
0 1 0 1 1 1 0 0
0 1 1 0 0 0 1 0
1 0 0 1 0 0 0 1
1 0 1 0 1 1 1 0
1 1 0 0 0 1 1 1
1 1 1 0 0 1 0
Circuit excitation table
K-map Simplification:
TA= B x and
With these Flip-Flop input functions and circuit output function we can draw
the logic diagram as follows.
Qn Qn+1 S R
0 0 0 x
0 1 1 0
1 0 0 1
1 1 x 0
Excitation table for SR Flip-Flop
Present
Input Next state Flip-Flop Inputs Output
state
A B X A B SA RA SB RB Y
0 0 0 0 0 0 x 0 x 0
0 0 1 1 0 1 0 0 x 1
0 1 0 1 1 1 0 x 0 0
0 1 1 0 0 0 x 0 1 0
1 0 0 1 0 x 0 0 x 1
1 0 1 0 1 0 1 1 0 0
1 1 0 0 0 0 1 0 1 1
1 1 1 1 0 x 0 0 1 0
Circuit excitation table
K-map Simplification:
With these Flip-Flop input functions and circuit output function we can draw
the logic diagram as follows.
Using the excitation table for JK Flip-Flop, we can determine the excitation
table for the given circuit as,
Present
Input Next state Flip-Flop Inputs Output
state
A B X A B JA KA JB KB Y
0 0 0 0 0 0 x 0 x 0
0 0 1 1 0 1 x 0 x 1
0 1 0 1 1 1 x x 0 0
0 1 1 0 0 0 x x 1 0
1 0 0 1 0 x 0 0 x 1
1 0 1 0 1 x 1 1 x 0
1 1 0 0 0 x 1 x 1 1
1 1 1 1 0 x 0 x 1 0
Circuit excitation table
K-map Simplification:
2. Design a clocked sequential machine using JK Flip-Flops for the state diagram
shown in the figure. Use state reduction if possible. Make proper state
assignment.
Soln:
State Table:
Next state Output
Present state
X= 0 X= 1 X= 0 X= 1
a a b 0 0
b c b 0 0
c a b 0 1
d a b 0 0
From the above state table a and d generate exactly same next state and same
output for every possible set of inputs. The state a and d go to next states a and b
and have outputs 0 and 0 for x=0 and x=1 respectively. Therefore state d can be
removed and replaced by a. The final reduced state table is shown below.
Binary Assignment:
Now each state is assigned with binary values. Since there are three states,
number of Flip-Flops required is two and 2 binary numbers are assigned to the states.
a= 00; b= 0; and c= 10
The reduced state diagram is drawn as,
Excitation Table:
Present State Next State Inputs
Qn Qn+1 J K
0 0 0 x
0 1 1 x
1 0 x 1
1 1 x 0
Excitation table for JK Flip-Flop
Present
Input Next state Flip-Flop Inputs Output
state
X A B A B JA KA JB KB Y
0 0 0 0 0 0 x 0 x 0
1 0 0 0 1 0 x 1 x 0
0 0 1 1 0 1 x x 1 0
1 0 1 0 1 0 x x 0 0
0 1 0 0 0 x 1 0 x 0
1 1 0 0 1 x 1 1 x 1
0 1 1 x x x x x x x
1 1 1 x x x x x x x
K-map Simplification:
With these Flip-Flop input functions and circuit output function we can draw
the logic diagram as follows.
3. Design a clocked sequential machine using T Flip-Flops for the following state
diagram. Use state reduction if possible. Also use straight binary state
assignment.
Soln:
State Table:
State table for the given state diagram is,
Even though a and c are having same next states for input X=0 and X=1,
as the outputs are not same state reduction is not possible.
State Assignment:
Use straight binary assignments as a= 00, b= 01, c= 10 and d= 11, the
transition table is,
Flip-Flop
Input Present state Next state Output
Inputs
X A B A B TA TB Y
0 0 0 0 0 0 0 0
0 0 1 1 1 1 0 0
0 1 0 0 0 1 0 1
0 1 1 0 1 1 0 1
1 0 0 0 1 0 1 0
1 0 1 1 0 1 1 0
1 1 0 0 1 1 1 0
1 1 1 0 0 1 1 1
K-map simplification:
Logic Diagram:
assignment.
Rule 2:
States that are the NEXT STATES of a single state should have assignment
which can be grouped into logically adjacent cells in a K-map.
K-map Simplification:
Now, we will apply the state assignment rules and compare the results.
K-map Simplification:
Thus by simply applying Rules 1 and 2 good results have been achieved.
1 All the Flip-Flops are not All the Flip-Flops are clocked
clocked simultaneously. simultaneously.
2 The delay times of all Flip- There is minimum propagation delay.
Flops are added. Therefore
there is considerable
propagation delay.
3 Speed of operation is low Speed of operation is high.
4 Logic circuit is very simple Design involves complex logic circuit
Assume that the counter is initially in the binary 0 state: i.e., both Flip-Flops
are RESET. When the positive edge of the first clock pulse is applied, FF 0 will toggle
because J0= k0= 1, whereas FF1 output will remain 0 because J1= k1= 0. After the first
clock pulse Q0=1 and Q1=0.
When the leading edge of CLK2 occurs, FF0 will toggle and Q0 will go LOW. Since
FF1 has a HIGH (Q0 = 1) on its J1 and K1 inputs at the triggering edge of this clock pulse,
the Flip-Flop toggles and Q1 goes HIGH. Thus, after CLK2, Q0 = 0 andQ1 = 1.
When the leading edge of CLK3 occurs, FF0 again toggles to the SET state (Q0
= 1), and FF1 remains SET (Q1 = 1) because its J1 and K1 inputs are both LOW (Q0 =
0). After this triggering edge, Q0 = 1 and Q1 = 1.
Finally, at the leading edge of CLK4, Q0 and Q1 go LOW because they both have
a toggle condition on their J1 and K1 inputs. The counter has now recycled to its
original state, Q0 = Q1 = 0.
Timing diagram
The output of FF1 (Q1) goes to the opposite state following each time Q0= 1.
This change occurs at CLK2, CLK4, CLK6, and CLK8. The CLK8 pulse causes the
counter to recycle. To produce this operation, Q0 is connected to the J1 and K1 inputs
of FF1. When Q0= 1 and a clock pulse occurs, FF1 is in the toggle mode and therefore
changes state. When Q0= 0, FF1 is in the no-change mode and remains in its present
state.
The output of FF2 (Q2) changes state both times; it is preceded by the unique
condition in which both Q0 and Q1 are HIGH. This condition is detected by the AND
gate and applied to the J2 and K2 inputs of FF3. Whenever both outputs Q0= Q1= 1,
the output of the AND gate makes the J2= K2= 1 and FF2 toggles on the following clock
pulse. Otherwise, the J2 and K2 inputs of FF2 are held LOW by the AND gate output,
FF2 does not change state.
CLOCK Pulse Q2 Q1 Q0
Initially 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
8 (recycles) 0 0 0
Timing diagram
Therefore, when Q0= Q1= Q2= 1, Flip-Flop FF3 toggles and for all other times it
is in a no-change condition. Points where the AND gate outputs are HIGH are
indicated by the shaded areas.
Timing diagram
CLOCK Pulse Q3 Q2 Q1 Q0
Initially 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10(recycles) 0 0 0 0
First, notice that FF0 (Q0) toggles on each clock pulse, so the logic equation
for its J0 and K0 inputs is
J0= K0= 1
This equation is implemented by connecting J0 and K0 to a constant HIGH level.
Next, notice from table, that FF1 (Q1) changes on the next clock pulse each
time Q0 = 1 and Q3 = 0, so the logic equation for the J1 and K1 inputs is
J1= K1= Q0Q3’
This equation is implemented by ANDing Q0 and Q3 and connecting the gate
output to the J1 and K1 inputs of FFl.
Flip-Flop 2 (Q2) changes on the next clock pulse each time both Q0 = Q1 =
1. This requires an input logic equation as follows:
Finally, FF3 (Q3) changes to the opposite state on the next clock pulse each time
Q0 = 1, Q1 = 1, and Q2 = 1 (state 7), or when Q0 = 1 and Q1 = 1 (state 9).The
equation for this is as follows:
Timing diagram
When UP/DOWN= 1, it will enable AND gates 1 and 3 and disable AND gates
2 and 4. This allows the Q0 and Q1 outputs through the AND gates to the J and K
inputs of the following Flip-Flops, so the counter counts up as pulses are applied.
When UP/DOWN= 0, the reverse action takes place.
3.14.6 MODULUS-N-COUNTERS
The counter with ‘n’ Flip-Flops has maximum MOD number 2n. Find the
number of Flip-Flops (n) required for the desired MOD number (N) using the
equation,
2n ≥ N
(i) For example, a 3 bit binary counter is a MOD 8 counter. The basic counter can
be modified to produce MOD numbers less than 2n by allowing the counter to
skin those are normally part of counting sequence.
n= 3
N= 8
2n = 23= 8= N
1. Find the number of Flip-Flops (n) required for the desired MOD number
(N) using the equation,
2n ≥ N.
2. Connect all the Flip-Flops as a required counter.
3. Find the binary number for N.
4. Connect all Flip-Flop outputs for which Q= 1 when the count is N, as inputs
to NAND gate.
5. Connect the NAND gate output to the CLR input of each Flip-Flop.
When the counter reaches Nth state, the output of the NAND gate goes LOW,
resetting all Flip-Flops to 0. Therefore the counter counts from 0 through N-1.
For example, MOD-10 counter reaches state 10 (1010). i.e., Q3Q2Q1Q0= 1 0 1 0. The
outputs Q3 and Q1 are connected to the NAND gate and the output of the NAND gate
goes LOW and resetting all Flip-Flops to zero. Therefore MOD-10 counter counts from
0000 to 1001. And then recycles to the zero value.
There are two ways to shift into a register (serial or parallel) and similarly two
ways to shift the data out of the register. This leads to the construction of four basic
register types—
i. Serial in- serial out,
ii. Serial in- parallel out,
iii. Parallel in- serial out,
iv. Parallel in- parallel out.
(i) Serial in- serial out (iii) Parallel in- serial out
(iii) Serial in- parallel out (iv) Parallel in- parallel out
the second clock pulse occurs, the 1 on the data input is shifted into FF0, causing FF0
to set; and the 0 that was in FF0 is shifted into FFl.
The third bit, a 0, is now put onto the data-input line, and a clock pulse is
applied. The 0 is entered into FF0, the 1 stored in FF0 is shifted into FFl, and the 0
stored in FF1 is shifted into FF2.
The last bit, a 1, is now applied to the data input, and a clock pulse is applied. This
time the 1 is entered into FF0, the 0 stored in FF0 is shifted into FFl, the 1 storedin FF1
is shifted into FF2, and the 0 stored in FF2 is shifted into FF3. This completesthe serial
entry of the four bits into the shift register, where they can be stored for any length of
time as long as the Flip-Flops have dc power.
To get the data out of the register, the bits must be shifted out serially and taken
off the Q3 output. After CLK4, the right-most bit, 0, appears on the Q3 output.
When clock pulse CLK5 is applied, the second bit appears on the Q3 output.
Clock pulse CLK6 shifts the third bit to the output, and CLK7 shifts the fourth bit to
the output. While the original four bits are being shifted out, more bits can be shifted
in. All zeros are shown being shifted out, more bits can be shifted in.
Four bits (1010) being entered serially-shifted out of the register and replaced by all zeros
In this shift register, data bits are entered into the register in the same as
serial-in serial-out shift register. But the output is taken in parallel. Once the data are
stored, each bit appears on its respective output line and all bits are available
simultaneously instead of on a bit-by-bit.
When SHIFT/LOAD is HIGH, gates G1, G2, G3 and G4 are disabled and gates
G5, G6 and G7 are enabled, allowing the data bits to shift right from one stage to the
next. The OR gates allow either the normal shifting operation or the parallel data-
entry operation, depending on which AND gates are enabled by the level on the
SHIFT/LOAD input.
The input 0 in each MUX is selected when S1S0= 00 and input 1 is selected when
S1S0= 01. Similarly inputs 2 and 3 are selected when S1S0= 10 and S1S0= 11
respectively. The inputs S1 and S0 control the mode of the operation of the register.
When S1S0= 00, the present value of the register is applied to the D-inputs of the
Flip-Flops. This is done by connecting the output of each Flip-Flop to the 0 input of
the respective multiplexer. The next clock pulse transfers into each Flip-Flop, the
binary value is held previously, and hence no change of state occurs.
When S1S0= 01, terminal 1 of the multiplexer inputs has a path to the D inputs of
the Flip-Flops. This causes a shift-right operation with the lefter serial input
transferred into Flip-Flop FF3.
When S1S0= 10, a shift-left operation results with the right serial input going into
Flip-Flop FF1.
Finally when S1S0= 11, the binary information on the parallel input lines (I1, I2,
I3 and I4) are transferred into the register simultaneously during the next clock pulse.
The function table of bi-directional shift register with parallel inputs and parallel
outputs is shown below.
Mode Control
Operation
S1 S0
0 0 No change
0 1 Shift-right
1 0 Shift-left
1 1 Parallel load
UNIT IV
ASYNCHRONOUS SEQUENTIAL CIRCUITS
4.1 INTRODUCTION
A sequential circuit is specified by a time sequence of inputs, outputs and
internal states. In synchronous sequential circuits, the output changes whenever a
clock pulse is applied. The memory elements are clocked flip-flops.
Asynchronous sequential circuits do not use clock pulses. The memory
elements in asynchronous sequential circuits are either unclocked flip-flops (Latches)or
time-delay elements.
more input variable change at exactly same instant. Therefore, simultaneous changes
of two or more input variables are avoided.
Only one input variable is allowed to change at any one time and the time
between input changes is kept longer than the time it takes the circuit to reach stable
state.
Types:
According to how input variables are to be considered, there are two types
Fundamental mode circuit
Pulse mode circuit.
4.2.2 Problems
1. An asynchronous sequential circuit is described by the following excitation and
output function,
Y= x1x2+ (x1+x2) y
Z= Y
a) Draw the logic diagram of the circuit.
b) Derive the transition table, flow table and output map.
c) Describe the behavior of the circuit.
Soln:
i) The logic diagram is shown as,
Logic diagram
ii)
y x1 x2 x1x2 (x1+x2)y Y= x1x2+ (x1+x2)y Z= Y
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 1 0 1 1
1 0 0 0 0 0 0
1 0 1 0 1 1 1
1 1 0 0 1 1 1
1 1 1 1 1 1 1
Transition table:
Output map:
Output is mapped for all stable states. For unstable states output is
mapped unspecified.
Flow table:
Assign a= 0; b= 1
iii)
The circuit gives carry output of the full adder circuit.
2. Design an asynchronous sequential circuit that has two internal states and one
output. The excitation and output function describing the circuit are as follows:
Y1= x1x2+ x1y2+ x2y1
Y2= x2+ x1y1y2+ x1y1
Z= x2+ y1.
a) Draw the logic diagram of the circuit.
b) Derive the transition table, output map and flow table.
Soln:
i) The logic diagram is shown as,
Logic Diagram
ii)
2+
1y1xy2
y
1 xx2
1 y x2
2 y x1
1 y x1
x
y
2x
Z=x
1
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 1 1
0 0 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 1 1 1
0 1 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 0 1 1
0 1 1 0 0 1 0 0 0 1 0 0
0 1 1 1 1 1 0 0 0 1 1 1
1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 1 0 0 1 0 0 1 1 1
1 0 1 0 0 0 0 0 1 0 1 1
1 0 1 1 1 0 1 0 1 1 1 1
1 1 0 0 0 0 0 0 0 0 0 1
1 1 0 1 0 0 1 0 0 1 1 1
1 1 1 0 0 1 0 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1
Logic diagram
ii)
y x1 x2 x 2’ x1x2’ (x1+x2’)y Y= x1x2’+ (x1+x2’)y Z= Y
0 0 0 1 0 0 0 0
0 0 1 0 0 0 0 0
0 1 0 1 1 0 1 1
0 1 1 0 0 0 0 0
1 0 0 1 0 1 1 1
1 0 1 0 0 0 0 0
1 1 0 1 1 1 1 1
1 1 1 0 0 1 1 1
Transition table:
Transition Table
Output map:
Output is mapped for all stable states. For unstable states output is
mapped unspecified.
Output map
Flow table:
Assign a= 0; b= 1
Logic Diagram
ii)
Transition table
Output map
Output is mapped for all stable states.
Flow table
Assign a= 0; b= 1
)x2
S= X’
Y 1’ Z1
W 2’
’
2
1
1
(Y1 Z1W’
W
X
Y
W2’
Z
Z
x
0 0 1 0 1 0 1 0 0 0 1
0 0 1 0 1 1 0 0 1 1 0
0 0 1 1 0 0 1 0 0 0 1
0 0 1 1 0 1 0 0 0 0 1
0 1 0 0 1 0 1 0 0 0 1
0 1 0 0 1 1 0 0 0 0 1
0 1 0 1 0 0 1 0 0 0 1
0 1 0 1 0 1 0 0 0 0 1
1 0 1 0 1 0 1 0 0 0 1
1 0 1 0 1 1 0 0 1 1 0
1 0 1 1 0 0 1 0 0 0 1
1 0 1 1 0 1 0 0 0 0 1
1 1 0 0 1 0 1 0 0 0 1
1 1 0 0 1 1 0 0 0 0 1
1 1 0 1 0 0 1 1 0 1 0
1 1 0 1 0 1 0 0 0 0 1
1. Label each latch output with Yi and its external feedback path (if any) with
yi for
i = 1,2 ,..,, k.
2. Derive the Boolean functions for the Si and Ri inputs in each latch.
3. Check whether SR = 0 for each NOR latch or whether S'R' = 0 for each NAND
latch. If either of these condition is not satisfied, there is a possibility that the
circuit may not operate properly.
4. Evaluate Y = S + R’y for each NOR latch or Y = S' + Ry for each NAND latch.
5. Construct a map with the y’s representing the rows and the x inputs
representing the columns.
6. Plot the value of Y= Y1Y2 ……Yk in the map.
7. Circle all stable states such that Y = y. The resulting map is the transition
table.
The analysis of a circuit with latches will be demonstrated by means of the
below example.
1. Derive the transition table for the pulse mode asynchronous sequential circuit
shown below.
Soln:
There are two inputs x1 and x2 and two external feedback loops giving rise
to the secondary variables y1 and y2.
Step 1:
The Boolean functions for the S and R inputs in each latch are:
Step 2:
Check whether the conditions SR= 0 is satisfied to ensure proper operation of the
circuit.
S1R1= x1y2 x1’x2’ = 0
S2R2= x1x2 x2’y1 = 0
The result is 0 because x1x1’ = x2x2’ = 0
Step 3:
Evaluate Y1 and Y2. The excitation functions are derived from the relation Y= S+
R’y. Y1= S1+ R1’y1 = x1y2 +(x1’x2’)’ y1
= x1y2 +(x1+ x2) y1 = x1y2 +x1y1+
x2y1 Y2= S2+ R2’y2 = x1x2+ (x2’y1)’y2
= x1x2+ (x2+ y1’) y2 = x1x2+ x2y2+ y1’y2
y1 y2 x1 x2 x1y2 x1y1 x2y1 x1x2 x2y2 y1’y2 Y1 Y2
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 1
0 1 0 0 0 0 0 0 0 1 0 1
0 1 0 1 0 0 0 0 1 1 0 1
0 1 1 0 1 0 0 0 0 1 1 1
0 1 1 1 1 0 0 1 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0 0
1 0 0 1 0 0 1 0 0 0 1 0
1 0 1 0 0 1 0 0 0 0 1 0
1 0 1 1 0 1 1 1 0 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0
1 1 0 1 0 0 1 0 1 0 1 1
1 1 1 0 1 1 0 0 0 0 1 0
1 1 1 1 1 1 1 1 1 0 1 1
Step 4:
Maps for Y1 and Y2.
Step 5:
Transition table
4.4 RACES:
A race condition is said to exist in an asynchronous sequential circuit when
two or more binary state variables change value in response to a change in an input
variable.
Races are classified as:
i. Non-critical races
ii. Critical races.
Non-critical races:
If the final stable state that the circuit reaches does not depend on the order in
which the state variables change, the race is called a non-critical race.
If a circuit, whose transition table (a) starts with the total stable state y1y2x=
000 and then change the input from 0 to 1. The state variables must then change from
00 to 11, which define a race condition.
The possible transitions are:
00 11
00 01 11
00 10 11
In all cases, the final state is the same, which results in a non-critical condition. In (a),
the final state is (y1y2x= 111), and in (b), it is (y1y2x= 011).
Critical races:
A race becomes critical if the correct next state is not reached during a state
transition. If it is possible to end up in two or more different stable states, depending
on the order in which the state variables change, then it is a critical race. For proper
operation, critical races must be avoided.
The below transition table illustrates critical race condition. The transition
table (a) starts in stable state (y1y2x= 000), and then change the input from 0 to 1. The
state variables must then change from 00 to 11. If they change simultaneously, the
final total stable state is 111. In the transition table (a), if, because of unequal
propagation delay, Y2 changes to 1 before Y1 does, then the circuit goes to the total
stable state 011 and remains there. If, however, Y1 changes first, the internal state
becomes 10 and the circuit will remain in the stable total state 101.
Hence, the race is critical because the circuit goes to different stable states,
depending on the order in which the state variables change.
4.5 CYCLES
Races can be avoided by directing the circuit through intermediate
unstable states with a unique state-variable change. When a circuit goes through a
unique sequence of unstable states, it is said to have a cycle.
Again, we start with y1y2 = 00 and change the input from 0 to 1. The transition table
(a) gives a unique sequence that terminates in a total stable state 101. The tablein (b)
shows that even though the state variables change from 00 to 11, the cycleprovides a
unique transition from 00 to 01 and then to 11, Care must be taken when using a cycle
that terminates with a stable state. If a cycle does not terminate with a
stable state, the circuit will keep going from one unstable state to another, making
the entire circuit unstable. This is demonstrated in the transition table (c).
Examples of Cycles
Debounce Circuit:
ground that provides a signal equivalent to logic 0. When one of the two contacts, A
or B, is not connected to ground through the switch, it behaves like a logic-1 signal.
When the switch is thrown from position A to position B and back, the outputs of the
latch produce a single pulse as shown, negative for Q and positive for Q'. The switch
is usually a push button whose contact rests in position A. When the pushbutton is
depressed, it goes to position B and when released, it returns to position A.
Debounce Circuit
The operation of the debounce circuit is as follows: When the switch resets in
position A, we have the condition S = 0, R = 1 and Q = 1, Q' = 0. When the switch is
moved to position B, the ground connection causes R to go to 0, while S becomes a 1
because contact A is open. This condition in turn causes output Q to go to 0 and Q' to
go to 1. After the switch makes an initial contact with B, it bounces several times. The
output of the latch will be unaffected by the contact bounce because Q' remains 1 (and
Q remains 0) whether R is equal to 0 (contact with ground) or equal to 1 (no contact
with ground). When the switch returns to position A, S becomes 0 and Q returns to
1. The output again will exhibit a smooth transition, even if there is a
contact bounce in position A.
1. Design a gated latch circuit with inputs, G (gate) and D (data), and one output, Q.
Binary information present at the D input is transferred to the Q output when G is
equal to 1. The Q output will follow the D input as long as G= 1. When G goesto
0, the information that was present at the D input at the time of transition
occurred is retained at the Q output. The gated latch is a memory element that
accepts the value of D when G= 1 and retains this value after G goes to 0, a change
in D does not change the value of the output Q.
Soln:
Step 1:
From the design specifications, we know that Q= 0 if DG= 01
and Q= 1 if DG= 11
because D must be equal to Q when G= 1.
When G goes to 0, the output depends on the last value of D. Thus, if the transition
is from 01 to 00 to 10, then Q must remain 0 because D is 0 at the time ofthe transition
from 1 to 0 in G.
Inputs Output
State Comments
D G Q
a 0 1 0 D= Q because G= 1
b 1 1 1 D= Q because G= 1
c 0 0 0 After state a or d
d 1 0 0 After state c
e 1 0 1 After state b or f
f 0 0 1 After state e
Step 2: A primitive flow is a flow table with only one stable total state in each row.
It has one row for each state and one column for each input combination.
Step 3:
The primitive flow table has only stable state in each row. The table can be
reduced to a smaller number of rows if two or more stable states are placed in the
same row of the flow table. The grouping of stable states from separate rows into one
common row is called merging.
Thus, the three rows a, c, and d can be merged into one row. The second row
of the reduced table results from the merging of rows b, e, and f of the primitive flow
table.
Reduced table- 1
The states c & d are replaced by state a, and states e & f are replaced by state b
Reduced table- 2
Step 4:
Assign distinct binary value to each state. This assignment converts the flow
table into a transition table. A binary state assignment must be made to ensure that
the circuit will be free of critical races.
Assign 0 to state a, and 1 to state b in the reduced state table.
Step 5:
From the information given in the transition table and from the latch
excitation table conditions, we can obtain the maps for the S and R inputs of the latch.
The logic diagram consists of an SR latch using NOR latch and the gates
required to implement the S and R Boolean functions. With a NAND latch, we must
use the complemented values for S and R.
S’ = (DG)’ and R’ = (D’G)’
Logic diagram with NOR latch Logic diagram with NAND latch
2. Design a negative-edge triggered T flip-flop. The circuit has two inputs, T (toggle)
and G (clock), and one output, Q. the output state is complemented if T= 1 and the
clock changes from 1 to 0 (negative-edge triggering). Otherwise, underany other
input condition, the output Q remains unchanged.
Step 1:
Starting with the input condition TC= 11 and assign it to a. The circuit goes to state
b and output Q complements from 0 to 1 when C changes from 1 to 0 while T remains a
1.
Another change in the output occurs when the circuit changes from state c to
state d. In this case, T=1, C changes from 1 to 0, and the output Q complements from
1 to 0. The other four states in the table do not change the output, because T is equal
to 0. If Q is initially 0, it stays at 0, and if initially at 1, it stays at 1 even though the
clock input changes.
Inputs Output
State Comments
T G Q
a 1 1 0 Initial output is 0
b 1 0 1 After state a
c 1 1 1 Initial output is 1
d 1 0 0 After state c
e 0 0 0 After state d or f
f 0 1 0 After state e or a
g 0 0 1 After state b or h
h 0 1 1 After state g or c
Specifications of total states
The rows in the primitive flow table are merged by first obtaining all
compatible pairs of states. This is done by means of the implication table.
Implication table
The implication table is used to find the compatible states. The only difference
is that when comparing rows, we are at liberty to adjust the dashes to fit any desired
condition. The two states are compatible if in every column of the corresponding
rows in the primitive flow table, there are identical or compatible pairs and if there is
no conflict in the output values.
Merger Diagram
The merger diagram is obtained from the list of compatible pairs derived from
the implication table. There are eight straight lines connecting the dots, one for each
compatible pair. The lines form a geometrical pattern consisting of two triangles
connecting (b, g, h) & (d, e, f) and two lines (a, f) & (c, h). The maximal compatibles
are:
(a, f) (b, g, h) (c, h) (d, e, f)
The reduced flow table is drawn. The compatible states are merged into one row
that retains the original letter symbols of the states. The four compatible set of states
are used to merge the flow table into four rows.
Here we assign a common letter symbol to all the stable states in each merged
row. Thus, the symbol f is replaced by a; g & h are replaced by b, and similarly for
the other two rows.
Logic Diagram:
3. Develop a state diagram and primitive flow table for a logic system that has two
inputs, X and Y, and a single output X, which is to behave in the following manner.
Initially, both inputs and output are equal to 0. Whenever X= 1 and Y= 0, the Z
becomes 1 and whenever X= 0 and Y= 1, the Z becomes 0. When inputs are zero,
i.e. X= Y= 0 or inputs are one, i.e. X= Y= 1, the output Z does not change; it remains
in the previous state. The logic system has edge triggered inputs withouthaving a
clock. The logic system changes state on the rising edges of the two inputs. Static
input values are not to have any effect in changing the Z
output.
Soln:
The conditions given are,
Initially both inputs X and Y are 0.
When X= 1, Y= 0; Z= 1
When X= 0, Y= 1; Z= 0
When X= Y= 0 or X= Y= 1, then Z does not change, it remains in the previous
state.
Step 1:
The above state transitions are represented in the state diagram as,
State diagram
Step 2:
A primitive flow table is constructed from the state diagram. The primitive
flow table has one row for each state and one column for each input combination.
Only one stable state exists for each row in the table. The stable state can be easily
identified from the state diagram. For example, state A is stable with output 0 when
inputs are 00, state C is stable with output 1 when inputs are 10 and so on.
We know that both inputs are not allowed to change simultaneously, so we can
enter dash marks in each row that differs in two or more variables from the input
variables associated with the stable state. For example, the first row in the flowtable
shows a stable state with an input of 00. Since only one input can change at anygiven
time, it can change to 01 or 10, but not to 11. Therefore we can enter two dashes in
the 11 column of row A.
The remaining places in the primitive flow table can be filled by observing
state diagram. For example, state B is the next state for present state A when input
combination is 01; similarly state C is the next state for present state A when input
combination is 10.
Step 3:
The rows in the primitive flow table are merged by first obtaining all
compatible pairs of states. This is done by means of the implication table.
The squares that contain the check marks ( ) define the compatible pairs:
(A, B) (A, D) (A, F) (B, D) (C, E) (C, F) (D, E) (E, F)
Step 4:
The merger diagram is obtained from the list of compatible pairs derived
from the implication table. There are eight straight lines connecting the dots, one for
each compatible pair. The lines form a geometrical pattern consisting of two triangles
connecting (A, B, D) & (C, E, F) and two lines (A, F) & (D, E). The maximal
compatibles are:
(A, B, D) (C, E, F) (A, F) (D, E)
Merger diagram
The condition that must be satisfied for merging rows is that the set of chosen
compatibles must cover all the states and must be closed. The set will cover all the states
if it includes all the states of the original state table. The closure condition is
satisfied if there are no implied states or if the implied states are included within the
set. A closed set of compatibles that covers all the states is called a closed covering.
If we remove (A, F) and (D, E), we are left with a set of two compatibles:
(A, B, D) (C, E, F)
All six states from the primitive flow table are included in this set. Thus, the set
satisfies the covering condition.
The reduced flow table is drawn as below.
Here we assign a common letter symbol to all the stable states in each merged
row. Thus, the symbol B & D is replaced by A; E & F are replaced by C.
Step 5:
Find the race-free binary assignment for the four stable states in the reduced
flow table. Assign A= 0 and C= 1
Substituting the binary assignment into the reduced flow table, the transition
table is obtained. The output map is obtained from the reduced flow table.
Step 6:
4. Design a circuit with inputs X and Y to give an output Z= 1 when XY= 11 but
only if X becomes 1 before Y, by drawing total state diagram, primitive flow
table and output map in which transient state is included.
Soln:
Step 1:
The state diagram can be drawn as,
State table
Step 2:
A primitive flow table is constructed from the state table as,
Step 3:
The rows in the primitive flow table are merged by first obtaining all
compatible pairs of states. This is done by means of the implication table.
Implication table
The squares that contain the check marks ( ) define the compatible pairs:
(A, B) (A, C) (A, D) (A, E) (B, D) (C, E)
Step 4:
The merger diagram is obtained from the list of compatible pairs derived
from the implication table. There are six straight lines connecting the dots, one for
each compatible pair. The lines form a geometrical pattern consisting of one triangle
connecting (A, B, D) & a line (C, E). The maximal compatibles are:
(A, B, D) (C, E)
Merger diagram
Here we assign a common letter symbol to all the stable states in each merged
row. Thus, the symbol B & D is replaced by A; E is replaced by C.
Transition table
5. Design a circuit with primary inputs A and B to give an output Z equal to 1 when A
becomes 1 if B is already 1. Once Z= 1 it will remain so until A goes to 0. Draw
the total state diagram, primitive flow table for designing this circuit.
Soln:
Step 1:
The state diagram can be drawn as,
State diagram
Step 2:
A primitive flow table is constructed from the state table as,
6. Design an asynchronous sequential circuit that has two inputs X 2 and X1 and one
output Z. When X1= 0, the output Z is 0. The first change in X2 that occurs while
X1 is 1 will cause output Z to be 1. The output Z will remain 1 until X 1 returns to
0.
Soln:
Step 1:
The state diagram can be drawn as,
State diagram
Step 2:
A primitive flow table is constructed from the state table as,
Step 3:
The rows in the primitive flow table are merged by obtaining all compatible
pairs of states. This is done by means of the implication table.
Implication table
The squares that contain the check marks ( ) define the compatible pairs:
(A, B) (A, C) (C, E) (D, F)
Step 4:
The merger diagram is obtained from the list of compatible pairs derived
from the implication table. There are four straight lines connecting the dots, one for
each compatible pair. It consists of four lines (A, B), (A, C), (C, E) and (D, F).
Merger diagram
Flow table
Here we assign a common letter symbol to all the stable states in each merged
row. Thus, the symbol B is replaced by A; E is replaced by C and F is replaced by D.
Step 5:
Find the race-free binary assignment for the four stable states in the
reduced flow table. Assign A= S0, C= S1 and D= S2.
Now, if we assign S0= 00, S1 = 01 and S2 = 10, then we need one more state S3=
11 to prevent critical race during transition of S0 S1 or S2 S1. By introducing S3
the transitions S1 S2 and S2 S1 are routed through S4.
Thus after state assignment the flow table can be given as,
Substituting the binary assignment into the reduced flow table, the transition
table is obtained. The output map is obtained from the reduced flow table.
K- Map simplification:
Logic Diagram:
7. Obtain a primitive flow table for a circuit with two inputs x1 and x2 and
two outputs z1 and z2 that satisfies the following four conditions.
i. When x1x2 = 00, output z1z2 = 00.
ii. When x1= 1 and x2 changes from 0 to 1, the output z1z2 = 01.
iii. When x2= 1 and x1 changes from 0 to 1, the output z1z2 = 10.
iv. Otherwise the output does not change.
Soln:
The state diagram can be drawn as,
State diagram
Step 2: A primitive flow table is constructed from the state table as,
4.7 HAZARDS
Hazards are unwanted switching transients that may appear at the output of a
circuit because different paths exhibit different propagation delays.
Hazards occur in combinational circuits, where they may cause a temporary
false-output value. When this condition occurs in asynchronous sequential circuits, it
may result in a transition to a wrong stable state.
Types of Hazards:
Static hazard
Dynamic hazard
Static- 0 hazard:
When the output of the circuit is to remain at 0, and a momentary 1 output is
possible during the transmission between the two inputs, then the hazard is called a
static 0-hazard.
Static- 1 hazard:
When the output of the circuit is to remain at 1, and a momentary 0 output is
possible during the transmission between the two inputs, then the hazard is called a
static 1-hazard.
Now consider the below network, and assume that the inverter has an
appreciably greater propagation delay time than the other gates. In this case there is
a static 0-hazard in the transition between the input states X1X2X3= 000 and X1X2X3=
010 since it is possible for a logic-1 signal to appear at both input terminals of the
AND gate for a short duration.
The delay in the inverter may cause the output of gate 1 to change to 1 before
the output of gate 2 changes to 0. In that case, both inputs of gate 3 are momentarily
equal to 0, causing the output to go to 1 for the short interval of time that the input
signal from X2 is delayed while it is propagating through the inverter circuit.
Thus, a static 0-hazard exists during the transition between the input states
X1X2X3= 000 and X1X2X3= 010.
The minterm 111 is covered by the product term implemented in gate 1 and
minterm 101 is covered by the product term implemented in gate 2. Whenever the
circuit must move from one product term to another, there is a possibility of a
momentary interval when neither term is equal to 1, giving rise to an undesirable 0
output.
The remedy for eliminating a hazard is to enclose the two minterms in
question with another product term that overlaps both groupings. This situation is
shown in the map above, where the two terms that causes the hazard are combined into
one product term. The hazard- free circuit obtained by this combinational is shown
below.
Hazard-free Circuit
The extra gate in the circuit generates the product term X 1X4. The hazards in
combinational circuits can be removed by covering any two minterms that may
produce a hazard with a product term common to both. The removal of hazards
requires the addition of redundant gates to the circuit.
5.1 INTRODUCTION
A memory unit is a collection of storage cells with associated circuits needed
to transfer information in and out of the device. The binary information is transferred
for storage and from which information is available when needed for processing. When
data processing takes place, information from the memory is transferred to selected
registers in the processing unit. Intermediate and final results obtained in the processing
unit are transferred back to be stored in memory.
The location of a unit of data in a memory array is called its address. For
example, in Figure (a), the address of a bit in the 3-dimensional array is specified by
the row and column. In Figure (b), the address of a byte is specified only by the row
in the 2-dimensional array. So, as you can see, the address depends on how the
memory is organized into units of data. Personal computers have random-access
memories organized in bytes. This means that the smallest group of bits that can be
addressed is eight.
The capacity of a memory is the total number of data units that can be stored.
For example, in the bit-organized memory array in Figure (a), the capacity is 64 bits.
In the byte-organized memory array in Figure (b), the capacity is 8 bytes, which is
also 64 bits. Computer memories typically have 256 MB (megabyte) or more of
internal memory.
Since a memory stores binary data, data must be put into the memory and data
must be copied from the memory when needed. The write operation puts data into a
specified address in the memory, and the read operation copies data out of a specified
address in the memory. The addressing operation, which is part of both thewrite and
the read operations, selects the specified memory address.
Data units go into the memory during a write operation and come out of the
memory during a read operation on a set of lines called the data bus. As indicated in
Figure, the data bus is bidirectional, which means that data can go in either
directional (into the memory or out of the memory).
To store a byte of data in the memory, a code held in the address register is placed
on the address bus. Once the address code is on the bus, the address decoder decodes the
address and selects the specified location in the memory. The memory then gets a write
command, and the data byte held in the data register is placed on the data bus and stored
in the selected memory address, thus completing the write operation. When a new data
byte is written into a memory address, the current data byte stored at that address is
overwritten (replaced with a new data byte).
A code held in the address register is placed on the address bus. Once the address
code is on the bus, the address decoder decodes the address and selects the specified
location in the memory. The memory then gets a read command, and a "copy" of the
data byte that is stored in the selected memory address is placed on the data bus and
loaded into the data register, thus completing the read operation. Whena data byte is
read from a memory address, it also remains stored at that address. This is called
nondestructive read.
There are two types of memories that are used in digital systems:
ROM (read-only memory) is a type of memory in which data are stored permanently
or semi permanently. Data can be read from a ROM, but there is no write operation
as in the RAM. The ROM, like the RAM, is a random-access memorybut the term RAM
traditionally means a random-access read/write memory. Because ROMs retain stored
data even if power is turned off, they are nonvolatile memories.
Classification of memories
RAMs are read/write memories in which data can be written into or read
from any selected address in any sequence. When a data unit is written into a given
address in the RAM, the data unit previously stored at that address is replaced by
the new data unit. When a data unit is read from a given address in the RAM, the
data unit remains stored and is not erased by the read operation. This
nondestructive read operation can be viewed as copying the content of an address
while leaving the content intact.
A RAM is typically used for short-term data storage because it cannot retain
stored data when power is turned off.
The two categories of RAM are the static RAM (SRAM) and the dynamic RAM
(DRAM). Static RAMs generally use flip-flops as storage elements and can therefore
store data indefinitely as long as dc power is applied. Dynamic RAMs use capacitors as
storage elements and cannot retain data very long without the capacitors being
recharged by a process called refreshing. Both SRAMs and DRAMs will lose stored
data when dc power is removed and, therefore, are classified as volatile memories.
Data can be read much faster from SRAMs than from DRAMs. However, DRAMs
can store much more data than SRAMs for a given physical size and cost because the
DRAM cell is much simpler, and more cells can be crammed into a given chip area than
in the SRAM.
Storage Cell:
The cell is selected by an active level on the Select line and a data bit (l or 0) is
written into the cell by placing it on the Data in line. A data bit is read by taking it off
the Data out line.
The memory cells in a SRAM are organized in rows and columns. All the cells
in a row share the same Row Select line. Each set of Data in and Data out lines go to
each cell in a given column and are connected to a single data line that serves as both
an input and output (Data I/O) through the data input and data output buffers.
SRAM chips can be organized in single bits, nibbles (4 bits), bytes (8 bits), or
multiple bytes (16, 24, 32 bits, etc.). The memory cell array is arranged in 256 rows
and 128 columns, each with 8 bits as shown below. There are actually 215 = 32,768
addresses and each address contains 8 bits. The capacity of this example memory is
32,768 bytes (typically expressed as 32 Kbytes).
Operation:
The SRAM works as follows. First, the chip select, CS, must be LOW for the
memory to operate. Eight of the fifteen address lines are decoded by the row decoder
to select one of the 256 rows. Seven of the fifteen address lines are decoded by the
column decoder to select one of the 128 8-bit columns.
Read:
In the READ mode, the write enable input, WE‘ is HIGH and the output
enable, OE‗ is LOW. The input tri state buffers are disabled by gate G1, and the
column output tristate buffers are enabled by gate G2. Therefore, the eight data bits
from the selected address are routed through the column I/O to the data lines (I/O1
through I/O7), which are acting as data output lines.
Write:
In the WRITE mode, WE‘ is LOW and OE‘ is HIGH. The input buffers are
enabled by gate G1, and the output buffers are disabled by gate G2. Therefore the
eight input data bits on the data lines are routed through the input data control and
the column I/O to the selected address and stored.
During each read cycle, one unit of data, a byte in this case is read from the
memory.
For the write cycle shown in Figure (b), a valid address code is applied to the
address lines for a specified time interval called the write cycle time, tWE . Next, the
chip select (CS) and the write enable (WE) in puts go LOW. The required time interval
from the beginning of a valid address until the WE input goes LOW is called the
address setup time, t s(A). The time that the WE input must be LOW is the write pulse
width. The time that the input WE must remain LOW after valid data are applied to
the data inputs is designated t WD; the time that the valid input data must remain on
the data lines after the WE input goes HIGH is the data hold time, t h(D).
During each write cycle, one unit of data is written into the memory.
ROM Cells
At row/column junctions where there are no gate connections, the column lines
remain LOW (0) when the row is addressed.
A PROM uses some type of fusing process to store bits, in which a memory link
is burned open or left intact to represent a 0 or a 1. The fusing process is irreversible;
once a PROM is programmed, it cannot be changed.
The fusible links are manufactured into the PROM between the source of each
cell's transistor and its column line. In the programming process, a sufficient current
is injected through the fusible link to bum it open to create a stored O. The link is left
intact for a stored 1. All drains are commonly connected to VDD.
Three basic fuse technologies used in PROMs are metal links, silicon links,
and pn junctions. A brief description of each of these follows.
1. Metal links are made of a material such as nichrome. Each bit in the memory
array is represented by a separate link. During programming, the link is either
"blown" open or left intact. This is done basically by first addressing a given cell
and then forcing a sufficient amount of current through the link to cause it to
open. When the fuse is intact, the memory cell is configured as a logic 1 and when
fuse is blown (open circuit) the memory cell is logic 0.
Two basic types of erasable PROMs are the ultraviolet erasable PROM (UV
EPROM) and the electrically erasable PROM (EEPROM).
• UV EPROM:
You can recognize the UV EPROM device by the transparent quartz lid on the
package, as shown in Figure below. The isolated gate in the FET of an ultraviolet
EPROM is "floating" within an oxide insulating material. The programming process
causes electrons to be removed from the floating gate. Erasure is done by exposure of
the memory array chip to high-intensity ultraviolet radiation through the quartz
window on top of the package.
The positive charge stored on the gate is neutralized after several minutes to an
hour of exposure time. In EPROM‘s, it is not possible to erase selective information,
when erased the entire information is lost. The chip can be reprogrammed.
During programming, address and datas are applied to address and data pins
of the EPROM. The program pulse is applied to the program input of the EPROM.
The program pulse duration is around 50msec and its amplitude depends on EPROM
IC. It is typically 11.5V to 25V.
The EEPROM (Electrically Erasable PROM), also uses MOS circuitry. Data is
stored as charge or no charge on an insulating layer, which is made very thin (<
200Å). Therefore a voltage as low as 20- 25V can be used to move charges across the
thin barrier in either direction for programming or erasing ROM.
Advantages of RAM:
Advantages of ROM:
Disadvantages of ROM:
1 It contains less memory cells It contains more memory cells per unit area.
per unit area.
2 Its access time is less, hence Its access time is greater than static RAM
faster memories.
3 It consists of number of flip- It stores the data as a charge on the capacitor.
flops. Each flip-flop stores It consists of MOSFET and capacitor for each
one bit. cell.
4 Refreshing circuitry is not Refreshing circuitry is required to maintain
required. the charge on the capacitors every time after
every few milliseconds. Extra hardware is
required to control refreshing.
5 Cost is more Cost is less.
5.8.1 INTRODUCTION:
A combinational PLD is an integrated circuit with programmable gates divided
into an AND array and an OR array to provide an AND-OR sum of product
implementation. The PLD‘s can be reprogrammed in few seconds and hence gives
more flexibility to experiment with designs. Reprogramming feature of PLDs also
makes it possible to accept changes/modifications in the previously design circuits.
Programmable Arrays:
All PLDs consists of programmable arrays. A programmable array isessentially
a grid of conductors that form rows and columns with a fusible link at each cross
point. Arrays can be either fixed or programmable.
The OR Array:
It consists of an array of OR gates connected to a programmable matrix with
fusible links at each cross point of a row and column, as shown in the figure below.
The array can be programmed by blowing fuses to eliminate selected variables from
the output functions. For each input to an OR gate, only one fuse is left intact in
order to connect the desired variable to the gate input. Once the fuse is blown, it
cannot be reconnected.
Another method of programming a PLD is the antifuse, which is the opposite of the
fuse. Instead of a fusible link being broken or opened to program a variable, a
normally open contact is shorted by ―melting‖ the antifuse material to form a
connection.
The basic PAL consists of a programmable AND array and a fixed OR array.
The AND gates are programmed to provide the product terms for the Boolean
functions, which are logically summed in each OR gate.
It is developed to overcome certain disadvantages of the PLA, such as longer
delays due to the additional fusible links that result from using two programmable
arrays and more circuit complexity.
PROMs are used for code conversions, generating bit patterns for characters
and as look-up tables for arithmetic functions.
2n x m PROM
2. Design a combinational circuit using PROM. The circuit accepts 3-bit binary and
generates its equivalent Excess-3 code.
B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 1 1
0 0 1 0 1 0 0
0 1 0 0 1 0 1
0 1 1 0 1 1 0
1 0 0 0 1 1 1
1 0 1 1 0 0 0
1 1 0 1 0 0 1
1 1 1 1 0 1 0
The PLA is similar to the PROM in concept except that the PLA does not provide
full coding of the variables and does not generate all the minterms.
The decoder is replaced by an array of AND gates that can be programmed to
generate any product term of the input variables. The product term are then
connected to OR gates to provide the sum of products for the required Boolean
functions. The AND gates and OR gates inside the PLA are initially fabricated with
fuses among them. The specific boolean functions are implemented in sum of
products form by blowing the appropriate fuses and leaving the desired connections.
The block diagram of the PLA is shown above. It consists of ‗n‘ inputs, ‗m‘ outputs,
‗k‘ product terms and ‗m‘ sum terms. The product terms constitute a group of ‗k‘ AND
gates and the sum terms constitute a group of ‗m‘ OR gates. Fuses are inserted between all
‗n‘ inputs and their complement values to each of the AND gates. Fuses are also provided
between the outputs of the AND gate and the inputs of the OR gates.
Another set of fuses in the output inverters allow the output function to be generated
either in the AND-OR form or in the AND-OR-INVERT form. With the inverter fuse in place,
the inverter is bypassed, giving an AND-OR implementation. With the fuse blown, the inverter
becomes part of the circuit and the function is implemented in the AND-OR- INVERT form.
A B C F1 F2
0 0 0 1 1
0 0 1 1 0
0 1 0 1 0
0 1 1 0 0
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 0 1
With this simplification, total number of product term is 6. But we require only 4
product terms. Therefore find out F1‘ and F2‘.
Now select, F1‘ and F2, the product terms are AC, AB, BC and A‘B‘C‘
In the PLA program table, first column lists the product terms numerically as
1, 2, 3, and 5. The second column (Inputs) specifies the required paths between the
AND gates and the inputs. For each product term, the inputs are marked with 1, 0,
or - (dash). If a variable in the product form appears in its normal form, the
corresponding input variable is marked with a 1. If it appears complemented, the
corresponding input variable is marked with a 0. If the variable is absent in the
product term, it is marked with a dash ( - ). The third column (output) specifies the
path between the AND gates and the OR gates. The output variables are marked with
1‘s for all those product terms that formulate the required function.
The PLA diagram uses the array logic symbols for complex symbols. Each input
and its complement is connected to the inputs of each AND gate as indicatedby the
intersections between the vertical and horizontal lines. The output of the AND gate are
connected to the inputs of each OR gate. The output of the OR gate goes toan EX-OR
gate where the other input can be programmed to receive a signal equal to either logic 1
or 0.
The output is inverted when the EX-OR input is connected to 1 ie., (x 1= x’).
The output does not change when the EX-OR input is connected to 0 ie., (x 0= x).
Solution:
With this simplification, total number of product term is 6. But we require only 4
product terms. Therefore find out F1‘ and F2‘.
Now select, F1‘ and F2, the product terms are B’C’, A’C’, A’B’ and
ABC. Step 3: PLA Program table
Input
Product s Outputs
term A B C F1 (C) F2 (T)
B‘C‘ 1 - 0 0 1 1
A‘C‘ 2 0 - 0 1 1
A‘B‘ 3 0 0 - 1 -
ABC 4 1 1 1 - 1
Solution:
A B C F1 F2 F3
0 0 0 0 1 0
0 0 1 1 1 0
0 1 0 1 0 1
0 1 1 0 0 0
1 0 0 1 0 0
1 0 1 0 0 0
1 1 0 1 1 1
1 1 1 0 1 0
Solution:
Step 1: Truth table for the given functions
A B C F1 F2
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 1 0
1 0 0 0 1
1 0 1 1 1
1 1 0 0 0
1 1 1 1 1
Step 2: K-map Simplification
A B C F1 F2
0 0 0 0 0
0 0 1 1 0
0 1 0 0 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 0 1
1 1 1 0 1
With this simplification, total number of product term is 5. But we require only 3
product terms. Therefore find out F1‘ and F2‘.
Now select, F1‘ and F2, the product terms are AC, AB and C’.
Step 3: PLA Program table
Input
Product s Outputs
term A B C F1 (C) F2 (T)
AB 1 1 1 - 1 1
C‘ 2 - - 0 1 -
AC 3 1 - 1 - 1
A B C F1 F2
0 0 0 1 0
0 0 1 1 1
0 1 0 0 1
0 1 1 1 1
1 0 0 1 1
1 0 1 0 1
1 1 0 0 0
1 1 1 0 0
Solution:
A B C D F G
0 0 0 0 0 0
0 0 0 1 0 1
0 0 1 0 0 0
0 0 1 1 1 0
0 1 0 0 1 0
0 1 0 1 1 1
0 1 1 0 0 0
0 1 1 1 1 1
1 0 0 0 0 0
1 0 0 1 0 0
1 0 1 0 1 0
1 0 1 1 0 1
1 1 0 0 0 0
1 1 0 1 0 0
1 1 1 0 1 0
1 1 1 1 1 1
The product terms are A‘BC‘, A‘CD, BCD, ACD‘, A‘C‘D, ACD
8. Design a BCD to Excess-3 code converter and implement using suitable PLA.
Solution:
Step 1: Truth table of BCD to Excess-3 converter is shown below,
BCD code Excess-3 code
Decimal
B3 B2 B1 B0 E3 E2 E1 E0
0 0 0 0 0 0 0 1 1
1 0 0 0 1 0 1 0 0
2 0 0 1 0 0 1 0 1
3 0 0 1 1 0 1 1 0
4 0 1 0 0 0 1 1 1
5 0 1 0 1 1 0 0 0
6 0 1 1 0 1 0 0 1
7 0 1 1 1 1 0 1 0
8 1 0 0 0 1 0 1 1
9 1 0 0 1 1 1 0 0
Step 2: K-map Simplification
The product terms are B3, B2B0, B2B1, B2B1’B0’, B2’B0, B2’B1, B1’B0’, B1B0, B0’
Integrated circuits
Integrated Circuits are used for producing several different circuit configurations and
production technologies. The semiconductor chip consists of electronic components
used for constructing circuits. Integrated circuits are classified into
Both operate with continuous and discrete signals respectively and are used to
construct various electronic circuits.
There are different levels of Integration, based on the number of logic gates in a
single IC package.
These IC‟s contain fewer logic gates (0 to 10).The input and output pins can be
directly connected to the pins in the package.
These IC‟s have approximately around 10 to 1000 gates in one package, which
performs some specific functions.
Based on the circuit technology digital IC‟s are classified into various types
Power Dissipation
Fan-in
Fan-out
Noise Margin
Operating Temperature
Propagation delay is defined as the time taken by the output of a gate to respond
when its inputs have changed.
Propagation delay shown in the diagram has two propagation delay times
Digital logic gates have a certain range of voltage and current levels
High level input voltage and current: The minimum input voltage recognised as logic
1(high level) by the logic gates (2V – 3V range) and the corresponding current is
high level input current.
Low level input voltage and current: The maximum input voltage recognised as logic
0(low level) by the logic gates (around 0.8V) and the corresponding current is low
level input current.
High level output voltage and current: The minimum voltage available at the output
corresponding to logic 1 and the corresponding current is high level output current.
Low level output voltage and current: The minimum voltage available at the output
corresponding to logic 0 and the corresponding current is low level output current.
Power Dissipation:
Fan-in:
Fan-out:
Fan-out is the number of similar logic gates that the output of a gate can drive
without affecting the normal operation.
Noise Margin:
Noise margin is the maximum external noise voltage added to the input signal that
does not cause any undesirable change in the circuit operation.
Operating Temperature:
Operating range
The following diagram shows the Resistor Transistor Logic (RTL) of NOR logic
function.
Here it is three input NOR gates logic diagram using RTL [i.e., A, B, C].
This follows the NOR gates truth table in its operation. i.e., whenever any one of the
input is “HIGH” then it produce low output (or) all inputs are low, it produces “Low”
output. This is similar to NOR logic truth table shown below.
Operation:
Since, all these transistors Q1, Q2, Q3 are in OFF condition; its collector output is
high.
When any one of the input is high (ort all inputs are high, then its corresponding
transistor is going to ON condition. Also, it is connected with ground and collector
potential which is approximately zero.
Operation Table
Drawbacks:
(ii) One more problem is that load transistor in a RTL gate are driven heavily into
saturation. Hence it results in long-turn-off delays.
1. Speed of operation is low, i.e., Propagation delay is of the order 500 ns. Hence it
cannot operate the system speed above 4 MHz.
3. Because of Base resistor in transistor, the power dissipation is more. This can be
reduced by introducing DCTL (Direct coupled transistor logic).
This DTL logic family reduces the problem of decreasing output voltage with
increasing load.
The following diagram shows the DTL NAND logic circuit using diode and transistor.
Operation:
When A = B = 1
Therefore D3 conduct. Hence the transistor base gets current flow and which is
turned ON.
When all inputs are zero, the D1 and D2 is in ON condition. Hence there is no input
current to base of the transistor. Q, hence it is in OFF condition. Thereby the output
in collector terminal of transistor Q is high, called saturated state.
Similarly if any one of the input is low (0) that makes the above operation. So output
is high (1)
Operation table
Propagation Delay:
The turn-off delay is considerably more than the turn-on-delay. Hence propagation
delay is 25 ns.
Noise immunity:
Anyhow, whatever the drawbacks, can be reduced (or) improved in TTL family.
The speed limitation of DTL is overcome by TTL family. It is the commonly used
saturating family and hence operating speed is high.
The figure shows the circuit diagram of 2-input NAND gate. Its input structure
consists of multiple-emitter transistor and output structure consists of totem-pole
output. Here, Q1 is an NPN transistor having two emitters, one for each input to
the gate. Although this circuit looks complex, we can simplify its analysis by using
the diode equivalent of the multiple-emitter transistor Q1, as shown in figure.
Diodes D2 and D3 represent the two E-B junctions of Q1 an d4 is the collector-
base (C-B) junction.
The input voltages A and B are either LOW (ideally grounded) or HIGH (ideally +
5 volts). If either A or B or both are low, the corresponding diode conducts and
the base of Q1 is pulled down to approximately 0.7 V. This reduces the base
voltage of Q2 to almost zero. Therefore, Q2 cuts off. With Q2 open, Q4 goes into
cut-off and the Q3 base is pulled HIGH. Since Q3 acts as an emitter follower, the
Y output is pulled up to a HIGH voltage. On the other hand, when A and B both
are HIGH, the emitter diode of Q1 are reversed biased making them off. This
causes the collector diode D4 to go into forward conduction. This forces Q2 base
to go HIGH. In turn, Q4 goes into saturation producing a low output.
Without diode D1 in the circuit, Q3 will conduct slightly when the output is low. To
prevent this diode is used; its voltage keeps the base-emitter diode of Q3 revere
biased only Q4 conducts when output is low.
The figure shows the three input TTL NAND gate. The operation of three input
TTL NAND is same as that of two output TTL NAND gate except that is Q1 (NPN)
transistor has three emitters instead of two. For three input NAND gate if all the
inputs are logic 1 then and then only output is logic 0; otherwise output is logic 1.
The operation is similar to the 2-input NAND gate. The table show the truth table
for 3-input NAND gate.
Totem-Pole Output
Totem-pole transistors are used because they produce LOW output impedance
Either way, the output impedance is low. This means that the output voltage can
change quickly from one state to the other because any stray output capacitance
is rapidly charged or discharged through the low output impedance. Thus the
propagation delay is low in totem-pole TTL logic.
Open-Collector Output
One problem with totem pole output is that two outputs cannot be tied together.
See the figure, where the totem pole outputs of two separate gates are
connected together at point X. Suppose that the output of gate A is high (Q3A ON
and Q4A OFF) and the output of gate B is low (Q3B OFF and Q4B ON). In this
situation transistor Q4B acts as a load for Q3A. Since Q4B is a low resistance
load, it draws high current around 55 mA. This current might not damage Q3A or
Q4B immediately, but over a period of time can cause overheating and
deterioration in performance and eventual device failure.
Some TTL devices provide another type of output called open collector output.
The outputs of two difference gates with open collector output can be tied
together. This known as wired logic. Figure shows a 2-input NAND gate with an
open-collector output eliminates the pull-up transistor Q3, D1 and R4. The output
is taken from the open collector terminal of transistor Q4.
Because the collector of Q4 is open, a gate like this will not work properly until you
connect an external pull-up resistor, as shown in fig. When Q4 is ON, output is low and
when Q4 is OFF output is tied to VCC through an external pull up resistor.
Output stage consists of pull-up transistor Output stage consists of only pull-down
(Q3), diode resistor and pull-down transistor.
transistor (Q4)
External pull-up resistor is not required. External pull-up resistor is required for
proper operation of gate.
Output of two gates cannot be tied Output of two gates can be tied together
together. using wired AND technique.
Table summarizes the difference between totem-pole and open collector outputs.
The tristate configuration is a third type of TTL output configuration. It utilizes the high-
speed operation of the totem-pole arrangement while permitting outputs to be wired-
ANDed (connected together). It is called tristate TTL because it allows three possible
output stages: HIGH, LOW and high impedance. We know the transistor Q3 is ON when
output is HIGH and Q4 is ON when output is LOW. In the high impedance state both
transistors, transistors Q3 and Q4 in the totem-pole arrangement are turned OFF. As a
result, the output is open or floating, it is neither LOW nor HIGH.
The figure shows the simplified circuit for tristate inverter. It has two inputs A and E.
A is the normal logic output whereas E is an ENABLE input. When ENABLE input
is HIGH, the circuit works as a normal inverter. Because when E is HIGH, the state of the
transistor Q1 (either ON or OFF) depends on the logic input A, and the additional
component diode is open circuited as its cathode is at logic HIGH. When ENABLE input is
LOW, regardless of the state of logic input A, the base-emitter junction of Q1 is forward
biased and as a result it turns ON. This shunts the current through R1 away from Q2
making it OFF. As Q2 is OFF, there is no sufficient drive for Q4 to conduct and hence Q4
turns off. The LOW at ENABLE input also forward-biases diode D2 which shunt the
current away from the base of Q3, making it OFF. In this way, when ENABLE input is
LOW, both transistors are OFF and output is at high impedance state. Fig shows the logic
symbols for tristate inverter. In above case circuit operation is enabled when ENABLE
input is HIGH. Therefore, ENBLE input is active high. The logic symbol for high enable
input is shown in figure. In some circuits ENABLE input can be active LOW, i.e. circuit
operates when ENABLE input is LOW. The logic symbol for active low ENABLE input is
shown in the figure.
Emitter Coupled Logic (ECL) is a non saturated digital logic family. It achieves the
propagation delay of 2ns. Its required high speed system operation. The output
provides both OR and NOR functions. Each input is connected to the base of
transistor. The two voltage levels are about -0.8 V for the high state and -1.8V for
the low state.
Emitter follower
The Emitter follower output requires a pull down resistor for current to flow. This
is obtained from the input resistor, Rp of other similar gates or from an external
resistor connected to a negative voltage supply.
Working:
If any of the input is high the corresponding input transistor is turned ON and
transistor Q3 is OFF.
Ex: if VA = -0.8V, the transistor Q1 starts conducting, So the VBE(Q1) = 0.8V. Now
VE(Q1) = VA - VBE(Q1) = -0.8V – 0.8V = -1.6V
Next to find the VBE(Q3). VBE(Q3) = VB(Q3) – VE(Q3) = -1.3 –(-1.6) =0.3V. Thus the
transistor Q3 is OFF. So the transistor Q1 is remains ON. The output voltage of the
transistor Q1 is low. So the input voltage of transistor Q6 is Low. Since the
transistor Q6 is a Emitter follower so the output of the transistor Q6 is also Low.
This output produce the NOR output of the circuit.
The transistor Q3 is OFF. The output voltage of the transistor Q3 is high. So the
input voltage of transistor Q5 is high. Since the transistor Q5 is a Emitter follower
so the output of the transistor Q5 is also high. This output produce the OR output
of the circuit.
2. If both the inputs are low, transistors Q1 and Q2 are turned OFF and transistor
Q3 is ON.
Next to find the VBE(Q1) or VBE(Q2) . VBE(Q1) = VB(Q1) – VE(Q1) = -1.8 –(-2.1)
=0.3V. Thus the transistor Q1 is OFF. So the transistor Q3 is remains ON. The
output voltage of the transistor Q3 is low. So the input voltage of transistor Q3 is
Low. Since the transistor Q5 is a Emitter follower so the output of the transistor
Q5 is also Low. This output produce the OR output of the circuit.
The transistor Q1 is OFF. The output voltage of the transistor Q1 is high. So the
input voltage of transistor Q6 is high. Since the transistor Q6 is a Emitter follower
so the output of the transistor Q6 is also high. This output produce the NOR
output of the circuit.
Operation Table
CMOS AS INVERTER
A Q1 Q2 Y
PMOS NMOS
0 ON OFF 1
1 OFF ON 0
When both inputs are LOW, Q1 and Q2 are on, and Q3 and Q4 are off.
When input A is LOW and input B is HIGH, Q1 and Q4 are on, and Q2 and Q3 are
off.
A B Q1 Q2 Q3 Q4 Y
When input A is HIGH and input B is LOW, Q1 and Q4 are off, and Q2 and Q3 are
on.
When both inputs are HIGH, Q1 and Q2 are off, and Q3 and Q4 are on.
When both inputs are LOW, Q1 and Q2 are on, and Q3 and Q4 are off.
A B Q1 Q2 Q3 Q4 Y
0 0 ON ON OFF OFF 1
0 1 ON OFF OFF ON 0
1 0 OFF ON ON OFF 0
1 1 OFF OFF ON ON 0
When input A is LOW and input B is HIGH, Q1 and Q4 are on, and Q2 and Q3 are
off.
When input A is HIGH and input B is LOW, Q1 and Q4 are off, and Q2 and Q3 are
on.
When both inputs are HIGH, Q1 and Q2 are off, and Q3 and Q4 are on. The
output is
Speed
100 (ECL 10 K)
power 144 300 100 0.7
40 (ECL 100 K)
product (PJ)
Portable
High speed
instrument
switching
with battery
Laboratory applications
Applications Absolute Absolute supply (low
instruments (low
power
propagation
consumption
delay)
)
Number of
High Fairly high Very high High Low
functions
Clock rate
8 12 – 30 15 – 60 60 – 400 5
MHz