The
circuit we have designed on the previous page uses:
6
AND gates
4
NOT gates
2
OR gates.
We
would need to buy two AND gate chips (each chip has four gates), one OR gate
chip, and 1 NOT gate chip.For this
circuit, it would be not be vastly expensive, but you can see that there is a
certain amount of redundancy.You can also see that the more redundancy, the more expensive
a complex system can become.
NAND
gate chips are particularly easy to make and are very cheap.So if we can make a circuit that consists of other gates entirely from
NAND gates, then we can save a lot on redundancy of our resources.So we use NAND gates as building blocks for circuits.
The
NOT gate is simple.
Question
9. How do we get a NOT gate from a NAND gate? Click HERE
to see the answer.
Question
10. Show how an AND gate can be made from two NAND gates. ANSWER.
The
OR gate is not so obvious to work out from first principles. However if we
use De Morgan I, we can see that:
Notice
the double inversion here. The basic circuit is shown in this diagram.
We
have looked extensively at the combinations of logic gates, and how we can make
circuits with a single gate as a unit.What
use is this, other than an academic exercise?Logic gates are used extensively in calculators and computers.Logic gates can be used to add binary numbers.Computers are adding machines; they do subtraction by a
process of complimentary addition, while they multiply by serial addition.
The circuits they use are based on
the half-adder.This copes with the rules for binary addition which are:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 carry 1
(1 + 1 + 1 = 1 carry 1)
The circuit has two outputs, a sum
and a carry.The sum is the
output of an exclusive OR gate (we can’t have 1 + 1 = 1), while the carry
output is that of an AND gate.The
Boolean algebra is:
sum = A + B
carry = A.B
This gives an arrangement shown below:
Question
15. Show how this circuit can be made with NAND gates. ANSWER