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.
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:
The Boolean expression can be written as: Q = NOT (A AND B)
The truth tableUsed to assess possible results of a Boolean algebra statement. would look like this:
A
B
A or B
Q = NAND
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
A
0
B
0
A or B
0
Q = NAND
1
A
0
B
1
A or B
0
Q = NAND
1
A
1
B
0
A or B
0
Q = NAND
1
A
1
B
1
A or B
1
Q = NAND
0
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:
The Boolean expression can be written as: Q = NOT (A OR B)