Skip to content

Instantly share code, notes, and snippets.

@jrhorn424 jrhorn424/nand
Created Apr 24, 2015

Embed
What would you like to do?
NAND is the root of all elementary logic.
NAND
====
| x | y | NAND |
| - | - | ---- |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOT(x) = (x NAND x)
===================
| x | NOT |
| - | --- |
| 0 | 1 |
| 1 | 0 |
| x | x | NAND |
| - | - | ---- |
| 0 | 0 | 1 |
| ... | ... | ... |
| 1 | 1 | 0 |
(x AND y) = NOT(x NAND y)
=========================
| x | y | AND |
| - | - | --- |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
| x | y | NAND | NOT |
| - | - | ---- | --- |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
(x OR y) = NOT(NOT(x) AND NOT(y))
=================================
| x | y | OR |
| - | - | -- |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
| x | y | NOT(x) | NOT(y) | AND | NOT |
| - | - | ------ | ------ | --- | --- |
| 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 | 0 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.