Figure 11.4 illustrates a NAND (Not-AND) gate.

Looking at 11.4 we can see that the output will always be “1” (+5V) unless both switches are closed — i.e. this circuit has the truth table shown below.

This gate is the inverse of the AND gate we saw earlier. It outputs a “1” when an AND gate would output a “0”, and a “0” when an AND would output a “1”. For that reason it's called a NAND (Not-AND) gate. It performs the logical function which is written as

i.e. “C equals Not (A and B).”

Figure 11.5 shows how we can build a Not-OR (NOR) gate using a pair of MOSFETs and a resistor.

In this case the output is high (5V) unless either of the inputs (or both) is high. The truth table for this gate is shown below.

The circuit provides the inverse of the OR function, hence it's called a NOR (Not-OR) gate. If you compare the AND/OR gate symbols shown in figures 11.1/11.2 with the NAND/NOR symbols shown in figures 11.3/11.4 you'll see that the inverting versions of the gates have little circles or blobs drawn on their outputs. This small circle is used on logic gate symbols to indicate that a signal is being inverted (or ‘notted’)

In theory, we can perform any logical function by using a suitable arrangement of NOT/AND/OR or NAND/NOR gates. In practice, of course, if we want a microprocessor chip it makes more sense to buy one already built onto a single chip. But if we really wanted to, we could build our own computers from lots and lots of NAND/NOR gates.

If you look at information on real digital electronics IC's you'll find they're described using terms like, “CMOS”, or “TTL”, or “Shottky-TTL”. These refer to the different kinds of transistors, diodes, etc, which're used inside the IC's to make the gates work. The circuits inside real gates are more complex than we've shown above — for example, “CMOS” stands for Complementary Metal Oxide Silicon. This means the gates use complementary pairs of transistors instead of the single kind shown in the above diagrams. Despite this extra complexity these gates behave in the same way, so you can ignore these details unless you decide to really get into digital electronics.

Summary


You should now know that we can process information using digital logic gates. That this logic can be built in various ways. You should know how to construct a circuit using diodes and resistors to make AND/OR gates, how transistors can be used as electronically controlled switches, and how to construct NOT/NAND/NOR gates using transistors and resistors. You should also know what we mean by a truth table of a gate (or circuit) and be able to explain the truth tables of AND/OR/NOT/NAND/NOR gates. You should also be aware that we can build any digital system, from a watch to a supercomputer, using an appropriate combination of NAND/NOR gates or NOT/AND/OR gates.





Content and pages maintained by: Jim Lesurf (jcgl@st-and.ac.uk)
using HTMLEdit2 on a StrongARM powered RISCOS machine.
University of St. Andrews, St Andrews, Fife KY16 9SS, Scotland.