Digital Circuits/NAND Logic

< Digital Circuits
A single NAND gate

Like NOR gates, NAND gates are so-called "universal gates" that can be combined to form any other kind of logic gate. Today, integrated circuits are not constructed exclusively from a single type of gate. Instead, EDA tools are used to convert the description of a logical circuit to a netlist of complex gates (standard cells) or transistors (full custom approach)

NAND

This is a NAND gate: trivially, just a NAND gate is used to realise it:

Desired GateNAND Construction
A B Q
0 0 1
0 1 1
1 0 1
1 1 0

NOT

A NOT gate is made by joining the inputs of a NAND gate. 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 part.

Desired GateNAND Construction
A Q
0 1
1 0

AND

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

Desired GateNAND Construction
A B Q
0 0 0
0 1 0
1 0 0
1 1 1

OR

If the truth table for a NAND gate is examined, it can be seen that if any of the inputs are 0, then the output will be 1. However to be an OR gate, if any input is 1, the output must also be 1. Therefore, if the inputs are inverted, any high input will trigger a high output.

Desired GateNAND Construction
A B Q
0 0 0
0 1 1
1 0 1
1 1 1

NOR

A NOR gate is simply an OR gate with an inverted output:

Desired GateNAND Construction
A B Q
0 0 1
0 1 0
1 0 0
1 1 0

XOR

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 OR B) AND (A NAND B).

Desired GateNAND Construction
A B Q
0 0 0
0 1 1
1 0 1
1 1 0

XNOR

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

Desired GateNAND Construction
A B Q
0 0 1
0 1 0
1 0 0
1 1 1

See also

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.