Bitwise NAND: 1011 0110 ↑ 0110 1101 — NAND gate
exam standardno processor has this instruction
Answer
11011011
Why this example is worth doing
Computing a bitwise NAND requires an AND followed by a NOT, because essentially no instruction set offers NAND directly — even though it is the cheapest gate in silicon. The page uses that gap to make a point about levels of abstraction: what is primitive at the transistor level is composite at the instruction level, and neither ordering is wrong. The worked bytes make the two-step nature concrete.
Try your own input in the NAND gate. Truth table, symbol and algebraic form for (A·B)′, the universal gate.
How the answer is reached
Column by column
A10110110
B01101101
result11011011
| bit | A | B | result |
|---|---|---|---|
| 7 | 1 | 0 | 1 |
| 6 | 0 | 1 | 1 |
| 5 | 1 | 1 | 0 |
| 4 | 1 | 0 | 1 |
| 3 | 0 | 1 | 1 |
| 2 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 |