Chapter 4
Chapter 4
• S (Sum) = AB + AB
• C (Carry) = A ▪ B
5
Full Adder
A B Cin Sum Cout
Sum= ABC+ ABC + ABC + ABC
0 0 0 0 0
0 0 1 1 0 Cout= ABC + ABC + ABC + ABC
0 1 0 1 0
0 1 1 0 1 Or
Sum = A ⊕ B ⊕ C
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Half Subtractor
• A half subtractor is a logical circuit that
performs a subtraction operation on two
binary digits.
X Y SUB BORROW
0 0 0 0
0 1 1 0
1 0 1 1
1 1 0 0
Full Subtractor
X Y B-in Sub B-out
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
Magnitude Comparator
A B A==B A>B A<B
• One bit comparator 0 0 1 0 0
0 1 0 0 1
1 0 0 1 0
1 1 1 0 0
AB + AB
AB
AB
2-bit Magnitude Comparator
Binary Code Conversion
• A digital circuit performs conversion from
one code to another is named as a code
converter.
• To convert from binary code A to binary
code B the input size lines must accept the
bit combination of code A and output lines
must generate the correspoding bit
combination of code B.
12
BCD to Excess-3 Code
Converter
Input lines Output lines
D C B A E3 E2 E1 E0
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
13
1 0 0 1 1 1 0 0
Cont..
• Fill the K-Map
• Write the logical equation
• Design the logic circuit
14
15