Two AND gates and an OR forming a 2:1 selector — circuit to expression

introreads back as S̄·A + S·B

Answer

B · S + A · S′ (output column 00011011)

Why this example is worth doing

The gate-level 2:1 multiplexer: two AND gates gated by S and its complement, feeding an OR. Reading it back gives the standard selector expression, and the page names it, because recognising a mux in a schematic is what lets a student replace nine gates with one part. It also makes the point that the inverter on S is not optional — without it both AND gates can be enabled at once and the OR sees a meaningless union rather than a selection.

Try your own input in the Logic circuit → expression. Wire up gates and read the Boolean expression and truth table back out.

How the answer is reached

Gate list

Gate list — columns Node, Gate, Inputs
NodeGateInputs
n1notS
g1andA, n1
g2andB, S
g3org1, g2

Quine–McCluskey

Prime implicants — Quine–McCluskey
#Term
1B · S
2A · S′
3A · B
Minimum cover — Quine–McCluskey
#Cover
1B · S + A · S′
Warning:

2 term(s), 4 literal(s); 2 essential prime implicant(s).

Truth table

Truth table — columns #, A, B, S, F
#ABSF
00000
10010
20100
30111
41001
51010
61101
71111

Compare with

Open the Logic circuit → expression

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

  • Shannon, “A Symbolic Analysis of Relay and Switching Circuits” (1938)
  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions