Digital devicesCombining logic gates

Computers exist in many digital devices that we use on a day-to-day basis. Digital devices may be input, output or storage devices. On a basic level, they all operate through the use of logic gates.

Part ofComputer ScienceHardware and software

Combining logic gates

A single logic gate can only do one simple function. To create more complex decisions and control systems, such as how a robot moves or how a microwave starts when the door is closed and a timer is set, logic gates are combined.

NAND gate (NOT AND)

An example of a combined logic gate is the NAND gate. This is made from a AND gate followed by a NOT Gate. The NAND gate gives the opposite result of an AND gate. It outputs 1 unless both inputs are 1.

An AND gate followed by a NOT gate can be drawn as two gates or combined as a NAND gate, as shown below:

A NOT AND gate, with a 1 over line A, 0 over line B, and 1 over the Q.

The Boolean expression can be written as: Q = NOT (A AND B)

The would look like this:

ABA or BQ = NAND
0001
0101
1001
1110
A0
B0
A or B0
Q = NAND1
A0
B1
A or B0
Q = NAND1
A1
B0
A or B0
Q = NAND1
A1
B1
A or B1
Q = NAND0

NOR gate (NOT OR)

The NOR gate gives the opposite result of an OR gate. It outputs 1 only if both inputs are 0.

An OR gate and NOT gate can also be drawn as an OR gate with a small circle on its output, for example:

NOR gate (NOT OR) illustrates 3 zero inputs leading to a result of 1

The Boolean expression can be written as: Q = NOT (A OR B)

The truth table would look like this:

ABC = A + BQ = NOR
0001
0110
1010
1110
A0
B0
C = A + B0
Q = NOR1
A0
B1
C = A + B1
Q = NOR0
A1
B0
C = A + B1
Q = NOR0
A1
B1
C = A + B1
Q = NOR0