Using NAND  or NOR gates to make up Circuits

The circuit we have designed on the previous page uses:

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.

Now try Question 11.

Question 12:  Use a truth table to prove that the circuit above is an OR gate.  ANSWER

If we look at Q we can clearly see that we have an OR gate.  Now we can convert the circuit above into one made up of NAND gates only.

However this is not an efficient use of resources.  We have an inverter followed by another inverter which is a waste.  So a more efficient circuit is:

The NOR gate made up of NAND gates is the same as the OR gate, but with an extra inverter, shown below.

The exclusive OR gate can be worked out again with Boolean algebra, but the derivation is rather tedious.  The NAND gate circuit is shown here.

 

NOR gates can be used in a similar way to NAND gates.

Question 13.  How would you make a NOT gate from a NOR gate?  ANSWER

We can use two NOR gates to produce an OR gate quite simply.  

Question 14.  How would you make an OR gate from a NOR gate?  ANSWER

NOR gates can be put together to from an AND gate, in the same way that NAND gates get put together to make an OR gate.

We can check this out with a truth table:

A

B

C

D

Q

0

0

1

1

0

1

0

0

1

0

0

1

1

0

0

1

1

0

0

1

This is of course the pattern of an AND gate.

 

The Operation of Combinational Logic Systems

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:

  This gives an arrangement shown below:

Question 15.  Show how this circuit can be made with NAND gates.  ANSWER

The truth table is as follows:

A

B

Sum

Carry

0

0

0

0

1

0

1

0

0

1

1

0

1

1

0

1

BACK to Karnaugh Maps

BACK to Combinational Logic

 

Home                  Electronics AS                    Module 2