Lect 11 - 23august21
Lect 11 - 23august21
Half-Subtractor
x y B D
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
B = x’y
D = x xor y
Full-Subtractor
x y z B D
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
D = x xor y xor z
x /yz (B) 00 01 11 10
0 1 1 1
1 1
x /yz (D) 00 01 11 10
0 1 1
1 1 1
CODE CONVERSION
It is sometimes necessary to use the output of one system as the input to another.
A conversion circuit must be inserted between the two systems if each uses different codes
for the same information.
Thus, a code converter is a circuit that makes the two systems compatible even though each
uses a different binary code.
1. System 1 🡪 BCD
Code conversion circuit
System 2🡪 Excess 3
2. No of inputs = 4
No of outputs = 4
3. Names of Inputs : a, b, c, d
Name of Outputs : w, x, y, z
4. Truth table
Inputs (BCD) Outputs(Excess 3)
a b c d w x y z
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
1 0 0 1 1 1 0 0
For w
ab/ cd 00 01 11 10
00
01 1 1 1
11 x x x x
10 1 1 x x
w = a + b. d + b. c
= a + b . (c + d)
Please find equations for x, y and z. And draw the circuit using logic gates.
Inputs : abcd
Outputs : pqrs
Inputs (Excess 3) Outputs (BCD)
a b c d p q r s
0 0 0 0 x x x x
0 0 0 1 x x x x
0 0 1 0 x x x x
0 0 1 1 0 0 0 0
0 1 0 0 0 0 0 1
0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1
0 1 1 1 0 1 0 0
1 0 0 0 0 1 0 1
1 0 0 1 0 1 1 0
1 0 1 0 0 1 1 1
1 0 1 1 1 0 0 0
1 1 0 0 1 0 0 1
1 1 0 1 x x x x
1 1 1 0 x x x x
1 1 1 1 x x x x
p = ab + acd = a(b+cd)
q = b'c'+bcd+acd'
r = c xor d
s = d’
g2 = b1 xor b2
g3 = b2 xor b3
g4 = b3 xor b4