Professional Documents
Culture Documents
ENEL 111: NAND Gates and Duality Adders Multiplexers
ENEL 111: NAND Gates and Duality Adders Multiplexers
ENEL 111: NAND Gates and Duality Adders Multiplexers
A NAND gate:
Y = A.B = A + B
Similarly a NOR gate is the same as an AND gate with two inverters Y = A + B = A.B
not the individual terms change the sign not the lot
Page 1
1
AND
A B
A.B A.B
OR
A A+B
AND feeding OR
x2 x4
x3
Page 2
2
b @Q W U & b
NOT
x4
x3
Example
AND gate
7 E E1 7 I1 4G1"@F"C46 FC b 4H1
7C I F'Q b A8 C
E DX U
7 E E1 7 I1 4G1"@F"C46 FC b 4H1
7C I F'Q b A8 C
7 E I1 4G1"@DX 4&
E DX U
dual circuit:
NOT
A.B
A.B
AND
B X4 X3 X2 A+B A.B A+B
X3 X2
Page 3
3
X4
Q b AFC I 3
A B
OR
A B
A.B
It is also possible to implement any boolean expression using only NOR gates Implement the following circuit using only NOR gates
7 E E1 7 I1 4G1"@F"C46 FC b 4H1
S and C are the Sum and Carry
7C I F'Q b A8 C
E DX U `
A 0 0 1 1
B S C 0 1 0 1
Exercise:
Cin 0 0 0 0 1 1 1 1
A 0 0 1 1 0 0 1 1
B 0 1 0 1 0 1 0 1
S 0 1 1 0 1 0 0 1
Cout 0 0 0 1 0 1 1 1
Complete the Karnaugh maps for the Sum and the Carry out columns
AB Cin 0 1
00 01 1 1
11
10 1
AB Cin 0 1
1
Cout = A.B + A.Cin + B.Cin
Page 4
4
U FC 9 FC HX T ' 53 U W 7 3 Q U1 Q C
Q b AFC I 3
Develop a truth table and Boolean expressions for the full adder, this circuit also includes a carry in.
Cin 0 0 0 0 1 1 1 1 A 0 0 1 1 0 0 1 1 B 0 1 0 1 0 1 0 1 S C
U b 4VIHX 4 b A8 "C9 DX U C I U1 I E E
U b C FC I
A B Cin
Cout
00 01
11 1
10
Sum
Cout
Cin
sel 0 0 0 0 1 1 1 1
a 0 0 1 1 0 0 1 1
b 0 1 0 1 0 1 0 1
out 0 0 1 1 0 1 0 1
sel 0 0 1 1
a 0 1 ? ?
b ? ? 0 1
out 0 1 0 1
AB sel 00 01 0 1 1
11 1 1
Principal can be extended to 4:1 2 select lines and 4 data lines 8:1 3 select lines and 8 data lines out
AB sel 00 01 0 1 1
and so on
11 1 1
10 1
Page 5
5
b I I U p b A @ BEDX d
10 1
U1 C 4 53
The Multiplexer
Selects one of 2n inputs and copies it to a single output The selected line is determined from the bit combination (address) on the n selection lines e.g. 1 from 2 mutiplexer a
sel 0 0 0 0 1 1 1 1 a 0 0 1 1 0 0 1 1 b 0 1 0 1 0 1 0 1
sel ab
Q b AFC I 3
n=1
0 1
out
out
sel
00 01 11 10
0 1
out =
sel
Change circuits using one set of gates (eg AND, OR, NOT) to their equivalent using NAND or NOR gates only (and vice versa).
Page 6
6
g g g