A logic table tells us what a circuit does, not how it is wired. Two very different circuits can do exactly the same job. To talk about “the job” itself we use Boolean functions; two expressions are equivalent when they compute the same function.
There are 2k input rows, and each row can have output 0 or 1, so there are 22k different Boolean functions of k variables (16 functions of 2 variables, 256 of 3 variables).
Equivalent expressions give circuits that do the same job, so we may always replace a circuit by a simpler equivalent one.
Checking equivalence with a program
For many variables a table by hand is slow. A short program can try all 2k inputs. This one compares the expressions of E10/E11:
Python · equivalent.py
from itertools import productdef X(x1, x2, x3): """(x1 AND x2) OR (x1 AND NOT x3)""" return (x1 and x2) or (x1 and not x3)def Y(x1, x2, x3): """x1 AND (x2 OR NOT x3)""" return x1 and (x2 or not x3)same = Trueprint("x1 x2 x3 | X Y")for bits in product([0, 1], repeat=3): x, y = int(bool(X(*bits))), int(bool(Y(*bits))) print(*bits, "|", x, y) if x != y: same = Falseprint("Equivalent:", same)
A Boolean function f:Bk→B gives an output bit for each of the 2k input tuples.
Every Boolean expression (and every circuit) defines a Boolean function.
X≡Y means equal outputs on all inputs; equivalent circuits do the same job.
Check equivalence by a full table, by the laws, or by a short program.
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Write the table of the Boolean function f:B3→B defined by (x1∧x2)∨(x1∧x3′) (E10).
Show worked answer
In the row order (e1,e2,e3) = 000, 001, 010, 011, 100, 101, 110, 111: e1∧e2 = 0, 0, 0, 0, 0, 0, 1, 1; e3′ = 1, 0, 1, 0, 1, 0, 1, 0; e1∧e3′ = 0, 0, 0, 0, 1, 0, 1, 0; so f = 0, 0, 0, 0, 1, 0, 1, 1. The function is 1 exactly at (1,0,0), (1,1,0) and (1,1,1).
MCA Online notes are made for reading on screen. Open https://mcastudy.online/mcs-212/boolean-algebra-and-circuits/boolean-functions-and-equivalent-expressions/ to read this page.