8-input OR as a zero detector — OR gate

corecomplement of the wide AND

Answer

output 1 on 255 of 256 input patterns

Why this example is worth doing

Invert an eight-input OR and you have a zero detector: the output asserts only when every bit of a byte is 0, one pattern in two hundred and fifty-six. That is the Z flag in a processor's status register, computed on every arithmetic result. The page pairs it with the eight-input AND example from the previous page so the symmetry is visible, and notes that both are built as trees for the same delay reason.

Try your own input in the OR gate. Truth table, symbol and algebraic form for A + B, with a live two-input toggle.

How the answer is reached

Truth table

Truth table — columns #, A, B, C, D, E, F, G, H, A + B + C + D + E + F + G + H
#ABCDEFGHA + B + C + D + E + F + G + H
0000000000
1000000011
2000000101
3000000111
4000001001
5000001011
6000001101
7000001111
8000010001
9000010011
10000010101
11000010111
12000011001
13000011011
14000011101
15000011111
16000100001
17000100011
18000100101
19000100111
20000101001
21000101011
22000101101
23000101111
24000110001
25000110011
26000110101
27000110111
28000111001
29000111011
30000111101
31000111111
Warning:

First 32 of 256 rows.

Compare with

Open the OR gate

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions
  • IEC 60617-12, Graphical Symbols for Diagrams — Binary Logic Elements