Combinational Logic
Combinational Logic
Combinational
Logic
▪ Multiplexers
▪ Demultiplexers
▪ Encoders
▪ Decoders
▪ Converters
• Binary to Gray Code
• Gray to Binary Code
• Binary to BCD Code
Course Teacher: Mujibur Rahman Maruf 5
Designing Combinational Circuits
Full
C- Z
Adder
Think of Z as a carry in
Carry
YZ Y’Z’ Y’Z YZ YZ’
X 00 01 11 10
X’ 0 0 0 1 0
C = XY + XZ + YZ
X 1 0 1 1 1
Course Teacher: Mujibur Rahman Maruf 10
Full Adder
Implementation of full adder in sum of products
S= xy z+x yz +xy z +xyz
C= xy +xz +yz
Think of
Z as a
carry in Course Teacher: Mujibur Rahman Maruf 12
Binary Parallel Adder
To add n-bit numbers:
• Use n Full-Adders in parallel
• The carries propagates as in addition by hand
1 0 1 0 Borrow
A 13 1 1 0 1
B - 6 1’s 1 0 01
7 10 1 1 0
+1
00 1 1 1
S = A + ( -B)
Course Teacher: Mujibur Rahman Maruf 16
Half Subtractor
▪ Subtracting a single-bit binary value B from anther A(I.e.A-B ) produces a
difference bit D and a borrow out bit B-out.
▪ This operation is called half subtraction and the circuit to realize it is called a half subtractor.
Half Adder Truth Table D = A’B + AB’
Inputs Outputs B-out = A’B
A B D B-out
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
B-out
A B Bin D Bout
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
D(A,B, B-in) = (1,2,4,7) 1 0 0 1 0
B-out(A, B, Bin) = (1,2,3,7) 1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
A B B-in D B-out
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1 D = A’B’(B-in) + AB’(B-in)’+ A’B(B-in)’+
0 1 1 0 1 AB(B-in)
1 0 0 1 0 D= A B (B-in)
1 0 1 0 0
1 1 0 0 0 D(A,B, B-in) = (1,2,4,7)
1 1 1 1 1 Bout(A, B, B-in) = (1,2,3,7)
Binary Binary
Code A Code Converter Code B
the logic circuit diagram of a 4-bit binary code to gray code converter −
The K-Map simplification for the gray code bit G2 The K-Map simplification for the gray code bit G3
Problem-1
A committee of three individuals decide issues for an organization. Each individual votes either
yes or no for each proposal that arises. A proposal is passed if it receives at least two yes
votes. Design a circuit that determines whether a proposal passes
A B C F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
X Y
Z= XY= X+Y= X+Y
Y
AND OR INVERTER
3
Course Teacher: Mujibur Rahman Maruf 5 35
Process for NAND Implementation
1. If starting from a logic expression, implement the design with AOI
logic.
2. In the AOI implementation, identify and replace every AND,OR, and
INVERTER gate with its NAND equivalent.
3. Redraw the circuit.
4. Identify and eliminate any double inversions (i.e., back-to-back
inverters).
5. Redraw the final circuit.
= B C' + A C
• Y(X,Y,Z) = ∑ m(1,3,7)
X’ 0 0 1 1 0
X 1 0 0 1 0
Y =X’Z+YZ
Self Task
Class work
In POS form
(A+B)(B’+C)(A+C) = (A+B)(B’+C)
Course Teacher: Mujibur Rahman Maruf 42
Fault in Logic Circuit
Stack at 0 and stack at 1 gate
Stack at 1
The output of a given point will stay 1 no matter what is the circuit connection
1
Stack at 0
The output of a given point will stay 0 no matter what is the circuit connection
Ex: how many two input NAND gate required to imolement 3 input AND gate ? Ans:4
how many two input NAND gate required to imolement 3 Input NAND
gate ? Ans:3
What is the total number of self-duals of a function which has 3 variables X, Y, and Z?
= 22^(3-1)
= 22^2
= 24
= 16
Course Teacher: Mujibur Rahman Maruf 45