Jump to content

NAND logic: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 17: Line 17:
! Input A !! Input B !! !! Output Q
! Input A !! Input B !! !! Output Q
|-
|-
| 0 || 0 || || 1
| 0 || 0 || || 0
|-
|-
| 0 || 1 || || 1
| 0 || 1 || || 1

Revision as of 11:42, 4 June 2013

Because the NAND function has functional completeness all logic systems can be converted into NAND gates. This is also true of NOR gates.
NAND logic is often used to optimize logic systems. Often when systems are converted to NAND logic gates become redundant, and can be removed from the system. As a result the system cost is reduced, as is propagation delay, and space used.

A NAND gate is an inverted AND gate. It has the following truth table:

Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0

A NOT gate is made by joining the inputs of a NAND gate together. Since a NAND gate is equivalent to an AND gate followed by a NOT gate, joining the inputs of a NAND gate leaves only the NOT gate.

Desired NOT Gate NAND Construction
Truth Table
Input A Output Q
0 1
1 0

An AND gate is made by following a NAND gate with a NOT gate as shown below. This gives a NOT NAND, i.e. AND.

Desired AND Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1

If the truth table for a NAND gate is examined or by applying De Morgan's Laws, it can be seen that if any of the inputs are 0, then the output will be 1. To be an OR gate, however, the output must be 1 if any input is 1. Therefore, if the inputs are inverted, any high input will trigger a high output.

Desired OR Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 1

A NOR gate is simply an inverted OR gate. Output is high when neither input A nor input B is high:

Desired NOR Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 1
0 1 0
1 0 0
1 1 0

An XOR gate is constructed similarly to an OR gate, except with an additional NAND gate inserted such that if both inputs are high, the inputs to the final NAND gate will also be high, and the output will be low. This effectively represents the formula: "(A NAND (A NAND B)) NAND (B NAND (A NAND B))".

Desired XOR Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 0

An XNOR gate is simply an XOR gate with an inverted output:

Desired XNOR Gate NAND Construction
Truth Table
Input A Input B Output Q
0 0 1
0 1 0
1 0 0
1 1 1

See also

  • NOR logic. Like NAND gates, NOR gates are also universal gates.

References

Lancaster, Don (1974). TTL Cookbook (1st ed.). Indianapolis, IN: Howard W Sams. pp. 126–135. ISBN 0-672-21035-5.