Digital Electronics (K-Wiki - Combinational Circuits)
Digital Electronics (K-Wiki - Combinational Circuits)
Digital Electronics (K-Wiki - Combinational Circuits)
Objectives
Upon completion of this chapter you will be able to:
Simplify Boolean Expressions using K-Map
Design basic Combinational Logic Circuits
Implement Boolean expressions using basic Combinational Circuits as building
blocks.
Analyze Combinational Circuits for any timing hazards.
Introduction
In last chapter we simplified Boolean expressions and designed logic circuits as a
combination of logic gates. Those circuits are called as Combinational Logic Circuits as the
output of those circuits depends on the combination of logic levels of Inputs. These circuits
do not have any memory characteristic. In this chapter we will discuss more about such
circuits and present a simple method for logic simplification which is K-Map (Karnaugh Map).
K-Map
Solved Examples
Minimize:-
m0,2,3
Problem: f A,B
Solution:
m0,1,2,3
Problem: f A,B
K–map provide minimize expression but not necessary unique i.e. two solution also possible.
Problem: f A,B,C m0,1,6,7 d3, 4,5
Solution: f A,B,C B AB
Problem: f A,B,C,D m0,1,3,5,7,8,9,11,13,15
Solution:
f A,B,C,D D BC
f A,B,C,D BD ACD
M 0,2,3
Problem: f A,B
Solution: f A,B B A
M 2,3 d1
Problem: f A,B
Solution: f A,B AB
Problem: f A,B,C M 0,1,3,5,7
Solution: f A,B,C C A B
Problem: f A,B,C M 0,2, 4,6
Solution: f A,B,C C
Solution:
f A,B,C B C B C
The two function are same if the position of 1’s and 0’s are same in k – map and if the 1’s
place 0 are placed and at 0’s place 1’s are placed then the function is complement to each
other.
Essential PI (EPI): It is a prime implicant which contains at least one min terms which is not
covered by other prime implicant.
In the figure shown below various Implicants can be formed by grouping the minterms in
different order and their classification is as mentioned below:
1) PI,Non EPI
2) PI, EPI
3) PI, EPI
4) PI, EPI
5) PI, EPI
Truth Table
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Logical expression
Implementation
Important Points
Half Subtractor
Half Subtractor performs the basic arithmetic operation of subtraction of two bits.
Truth Table
A B Diff Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Logical expression
Difference = AB AB and Borrow B = AB
Implementation
Important Points
Full Adder
A Full Adder is a combinational circuit that forms the arithmetic sum of three bits.
Truth Table
A B C SUM CARRY
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
Logical expression
SUM = ABC ABC ABC ABC A B C m 1,2, 4,7
In full adder if each logic gate has proportion delay of tpd, then to provide sum or carry
Now, CARRY = ABC ABC ABC ABC AB C C C AB AB AB C A B
Implementation
Important Points
Types of Adders
Parallel Adder
4 bit adder
A A A A
3 2 1 0
1 1 0 1
S S S S C
1 0 1 1 3 2 1 0 4
Carry
B B B B Sum
3 2 1 0
P A B , G A B , S P C , C PC G
i i i i i i i i i i 1 i i i
1 1 0 0 0 1
C P C G P P C G G P P C P G G
2 1 1 1 0 0 1 0 1
C P C G P P P C P P G P G G
3 2 2 2 210 0 21 0 2 1 2
C P C G P P P P C P P P G P P G P G G
4 3 3 3 3210 0 321 0 32 1 3 2 3
n n 1 4 5
Total number of AND gate inside = 1 + 2 + 3 + 4 = 10
2 2
Number of OR Gate = n
Total propagation delay = 2t
pd
This is faster than parallel adder.
Full Subtractor
Truth table
A B C Diff A B C BORROW
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
Logic expression
Difference A B C = m 1,2, 4,7
Borrow AB AC BC m 1,2,3,7
Implementation
Important Points
Number of NAND gate required = 9
Number of NOR gate required = 9
Logical expression for Difference = A B C
Logical expression for Borrow = AB AC BC or AB C A B
Number of MUX required = 3 (4 x 1) MUX
Number of Decoder required = 1 (3 x 8) Decoder and 2 OR gate.
Comparator
A comparator is a combinational circuit which compares two bits and produces three outputs
based on the relative values of the bits.
Truth Table
A B X Y Z
0 0 0 1 0
0 1 0 0 1
1 0 1 0 0
1 1 0 1 0
x y z
AB AB AB
Logic Expression
X AB , Y AB AB AB , Z AB
Implementation
If A A A A are equal to B B B B
3 2 1 0 3 21 0
Multiplexer
It is also called as Data selector or many to one circuit or universal logic circuit or parallel
to serial circuit.
m 2n or n=log2m
Where m = no. of data inputs
n = no. of select inputs (control inputs)
2:1 MUX
Symbol of MUX
Truth table
S Y
0 I
o
1 I
1
Logical expression
Y SI SI
o 1
Implementation
4 : 1 MUX
Truth Table
S S Y
1 0
0 0 I
o
0 1 I
1
1 0 I
2
1 1 I
3
Logical expression
Y S S I S S I S S I S S I
1 00 1 0 1 1 02 1 03
8 4 2 1
16 1 15 (2 1) MUX
32 16 8 4 2 1
64 1 63 (2 1) MUX
128 64 32 16 8 4 2 1
256 1 255 (2 1) MUX
16 4
Number of MUX = 4 1 5
4 4
16 4 1
64 1 MUX 21 (4 1) MUX
2 : 1 MUX
NOT Gate
Y S I S I A 1 0 A A
00 01
AND Gate
Y A * 0 AB = AB
OR Gate
Y AB A 1 = A + B
NAND Gate
Y A 1 BA A B AB
For B :
NOR Gate
Y AB A * 0 A B
EXOR Gate
Y AB AB
EXNOR Gate
Y AB AB
Note
4 : 1 MUX
AND Gate
OR Gate
EXOR Gate
EXNOR Gate
Solved Examples
Problem:
Solution: Y ABC ABC ABC ABC AC B B AC B B AC AC AC
Problem:
Solution:
A B C
0 0 0 C B A
0 0 1 C B A
0 1 0 C B A
0 1 1 C B A
1 0 0 C B A
1 0 1 C B A
1 1 0 C B A
1 1 1 C B A
AB AB AB AB
I0 I1 I2 I3
C 0 2 4 6
C 1 3 5 7
1 0 C 1
Solution: i) AB AB AB AB
I0 I1 I2 I3
C 0 2 4 6
C 1 3 5 7
C 1 C 1
1 – 4 : 1 MUX required
ii) AC AC AC AC
I0 I1 I2 I3
B 0 1 4 5
B 2 3 6 7
B 1 B 1
iii) BC Control:
BC BC BC BC
I0 I1 I2 I3
A 0 1 2 3
A 4 5 6 7
0 1 1 1
Important Points
DEMUX (Demultiplexer)
DEMUX is combinational circuit which has one Input and multiple outputs and depending
on select Input, data Input is transferred to any of the outputs.
Also known as 1 to many circuit or data distributor
Truth Table
S Y Y
1 0
0 0 I
1 I 0
Implementation:
1 : 4 DEMUX
3
1 x 4 DEMUX 1 x 2 DEMUX
7
1 x 8 DEMUX
1 x 2 DEMUX
5
1 x 16 DEMUX 1 x 4 DEMUX
21
1 x 64 DEMUX
1 x 4 DEMUX
9
1 x 64 DEMUX
1 x 8 DEMUX
17
1 x 256 DEMUX
1 x 16 DEMUX
DECODER
Decoder is a combinational circuit which have multiple Inputs and multiple outputs.
It is used to convert binary data to other code (binary octal)
Ex.
Binary to octal (3 x 8)
BCD to Decimal (4 x 10)
Binary to Hexadecimal
BCD to Seven Segment
2 x 4 Decoder:
Truth Table
E A B y y y y
3 2 1 0
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
Solved Examples
We implement HA using 1–2 x 4 decoder and 1 OR gate and some for HS.
Solved Examples
Problem: Implement using 3 x 8 decoder make F.A.
4 16
5
2 4
1 16
5
1 4 (Since 2 x 4 decoder means 1 x 4 DEMUX using 2 select line)
16 1 4 1
5
ENCODER
Encoder is the combinational circuit which have multiple Inputs and multiple outputs.
Encoder is used to convert other code to Binary.
Ex. octal to Binary, Decimal to BCD, Hexadecimal to Binary
In normal encoder one of the Input line is high and corresponding binary code is available
at the output.
But this may create a problem when more than one Input line is high. So we design Priority
Encoder.
In priority encoder more than one Inputs is high but binary output corresponds to the
highest priority input.
Truth table
I I I I I I I I Y Y Y
7 6 5 4 3 2 1 0 2 1 0
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
Logical expression
Y I I I I
0 1 3 5 7
Y I I I I
1 2 3 6 7
Y I I I I
2 4 5 6 7
Hazards
Hazards are unwanted switching transients that may appear at the output of a circuit due to
different paths exhibiting different propagation delays. Hazards occur in Combinational
Circuits where they may cause a temporary false value at the output.
Hazard
To avoid static and dynamic hazard redundant terms are added in a combinational circuit.
Essential Hazard cannot be avoided but feels essentials
Case 2: If there is propagation delay of 1ns in NOT gate and no delay in AND gate.
Case 3: If there is propagation delay of 1ns in NOT gate and 2ns in AND gate
Similarly, if the output is expected to be static at “Logic 1” but it exhibits a small glitch of
“Logic 0” then it is called as Static-1 Hazard.