(A + B)·(C + D) — logic gate diagram

intro3 primitive gates, 2 levels, 4 inputs

Answer

3 gates, 4 inputs; output column 0000011101110111

Why this example is worth doing

A two-level OR-AND network — the product-of-sums shape — which is what you draw when the minimal form is a POS rather than an SOP. Structurally it is the mirror image of the previous example, and putting them next to each other is the fastest way to see that AND-OR and OR-AND are the same amount of hardware. The page notes that CMOS actually implements the inverting versions more cheaply, which is why real synthesis output is full of NAND and NOR rather than the shapes drawn in textbooks.

Try your own input in the Logic gate diagram builder. Draw an expression as a gate schematic in IEEE or IEC symbols and copy it as an image.

How the answer is reached

Netlist

Netlist — columns Node, Gate, Inputs
NodeGateInputs
g0ori0, i1
g1ori2, i3
g2andg0, g1

Truth table

Truth table — columns #, A, B, C, D, F
#ABCDF
000000
100010
200100
300110
401000
501011
601101
701111
810000
910011
1010101
1110111
1211000
1311011
1411101
1511111

Compare with

Open this example in the Logic gate diagram builder

The field arrives filled in with this example’s input.

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