Warning: Update in progress. Before adding new content, I'm going through and updating the content that already existed that I haven't touched in years. Also fixing up a lot of CSS. I wrote bad code a very long time ago and it's taking a while to update it.
This page has not been looked at yet My apologies for any issues this may cause.

4.2.5 : Nand


Just as OR had NOR, AND has NAND. NAND is the combination of NOT and AND. This means the truth table is just the AND truth table with the results inverted. NAND is true as long as both the values are not true. Fun Fact: NOR and NAND are considered the universal gates, as using a combination of these two can create any gate.

Notation: x NAND y
x y x NAND y
0 0 1
0 1 1
1 0 1
1 1 0
{ "width":312, "height":108, "showToolbox":false, "devices":[ {"type":"DC","id":"dev0","x":52,"y":36,"label":"DC"}, {"type":"NAND","id":"dev1","x":164,"y":36,"label":"NAND"}, {"type":"LED","id":"dev2","x":220,"y":36,"label":"LED"}, {"type":"Toggle","id":"dev3","x":108,"y":12,"label":"X"}, {"type":"Toggle","id":"dev4","x":108,"y":60,"label":"Y"} ], "connectors":[ {"from":"dev1.in0","to":"dev3.out0"}, {"from":"dev1.in1","to":"dev4.out0"}, {"from":"dev2.in0","to":"dev1.out0"}, {"from":"dev3.in0","to":"dev0.out0"}, {"from":"dev4.in0","to":"dev0.out0"} ] }

NAND is much like NOR, as mathematically, there isn't an exact equivalent. However, just like NOR, NAND is a universal gate.


A Universal Gate

Just like NOR, NAND is a universal gate. All gates can be made with NAND. We can create a NOT gate by putting the same input twice into a NAND. This means we can do NOT NAND which is AND. Finally we can apply DeMorgan's law to get OR. We'll talk more about DeMorgan's law in the Complex Expressions page.

x x NAND x NOT x
0 1 1
1 0 0

x y (x NAND x)
NAND
(y NAND y)
x OR y
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
x y (x NAND y)
NAND
(x NAND y)
x AND y
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1


Practice Problems

If y is false and x is true, what is (x NAND ¬ y)?



Back To Top