G27
Self-checkedTier 1 14 min readdl.boolean-algebra

Boolean algebra and identities

The algebra of two values: postulates, the laws and identities (De Morgan, absorption, consensus), duality versus complement, XOR, the count of Boolean functions, and algebraic simplification.

Why it exists

A digital circuit is built from switches that are on or off. Boolean algebra is the arithmetic of such two-valued signals. It lets you take a description of what a circuit must do, rewrite it into the cheapest equivalent expression, prove that two circuits behave identically, and convert between gate types. Almost every other topic in this subject is an application: Karnaugh maps and Quine-McCluskey are systematic simplification, adders and multiplexers are built by writing the function and simplifying it, and flip-flop inputs are Boolean functions of the current state.

GATE asks three kinds of questions here: simplify an expression to a given form, decide whether two expressions are equal (or whether an identity holds), and count or characterise functions.

Prerequisites

None. This is a starting point.

None. Familiarity with the bitwise operators of C helps: &, |, ^ and ~ on single bits behave exactly like AND, OR, XOR and NOT.

Precise definitions

Boolean values and operations. A Boolean variable takes the value 0 or 1. The three basic operations are

OperationNotationValue
ANDx⋅yx \cdot y or xyxy1 only if both are 1
ORx+yx + y0 only if both are 0
NOTx′x' or xˉ\bar{x}the other value

Precedence. NOT first, then AND, then OR, unless parentheses say otherwise. So A+BCA + BC means A+(BC)A + (BC), and A′BA'B means (A′)⋅B(A')\cdot B.

Boolean function. A function f:{0,1}n→{0,1}f : \{0,1\}^n \to \{0,1\}. It is completely described by its truth table with 2n2^n rows. Two expressions are equal exactly when their truth tables are equal. Consequently the number of different Boolean functions of nn variables is 22n2^{2^n}: 4 for n=1n = 1, 16 for n=2n = 2, 256 for n=3n = 3, 65536 for n=4n = 4.

Basic laws. For all x,y,zx, y, z (each law has an AND form and an OR form):

NameAND formOR form
identityx⋅1=xx \cdot 1 = xx+0=xx + 0 = x
null (annulment)x⋅0=0x \cdot 0 = 0x+1=1x + 1 = 1
idempotentx⋅x=xx \cdot x = xx+x=xx + x = x
complementx⋅x′=0x \cdot x' = 0x+x′=1x + x' = 1
involution(x′)′=x(x')' = x
commutativexy=yxxy = yxx+y=y+xx + y = y + x
associative(xy)z=x(yz)(xy)z = x(yz)(x+y)+z=x+(y+z)(x+y)+z = x+(y+z)
distributivex(y+z)=xy+xzx(y+z) = xy + xzx+yz=(x+y)(x+z)x + yz = (x+y)(x+z)
absorptionx(x+y)=xx(x+y) = xx+xy=xx + xy = x
simplificationx(x′+y)=xyx(x'+y) = xyx+x′y=x+yx + x'y = x + y
combining (adjacency)(x+y)(x+y′)=x(x+y)(x+y') = xxy+xy′=xxy + xy' = x
consensus(x+y)(x′+z)(y+z)=(x+y)(x′+z)(x+y)(x'+z)(y+z) = (x+y)(x'+z)xy+x′z+yz=xy+x′zxy + x'z + yz = xy + x'z
De Morgan(x+y)′=x′y′(x+y)' = x'y'(xy)′=x′+y′(xy)' = x' + y'

Note that the OR-over-AND distributive law, x+yz=(x+y)(x+z)x + yz = (x+y)(x+z), has no counterpart in ordinary arithmetic.

De Morgan for many variables. (x1x2⋯xn)′=x1′+x2′+⋯+xn′(x_1 x_2 \cdots x_n)' = x_1' + x_2' + \cdots + x_n' and (x1+x2+⋯+xn)′=x1′x2′⋯xn′(x_1 + x_2 + \cdots + x_n)' = x_1' x_2' \cdots x_n'.

Complement of a function. To complement an expression, swap AND with OR and complement every literal (apply De Morgan repeatedly). Do not forget to keep the grouping. For F=AB′+AC+A′BF = AB' + AC + A'B the complement is F′=A′B′+ABC′F' = A'B' + ABC' (checked in example 4).

Dual. The dual FdF^d of an expression is obtained by swapping AND with OR and 0 with 1, leaving the literals alone. As a function, Fd(x1,…,xn)=(F(x1′,…,xn′))′F^d(x_1,\dots,x_n) = \big(F(x_1',\dots,x_n')\big)'. The duality principle: if two expressions are equal, their duals are equal. A function with F=FdF = F^d is self-dual; the number of self-dual functions of nn variables is 22n−12^{2^{n-1}} (4 for n=2n = 2, 16 for n=3n = 3).

Complement is not dual. The dual of F=AB+C′F = AB + C' is (A+B)C′(A+B)C', but its complement is (A′+B′)C(A'+B')C.

XOR and XNOR. x⊕y=xy′+x′yx \oplus y = xy' + x'y is 1 when the inputs differ. x⊙y=(x⊕y)′=xy+x′y′x \odot y = (x \oplus y)' = xy + x'y' is 1 when they are equal. Properties: commutative, associative, x⊕0=xx \oplus 0 = x, x⊕1=x′x \oplus 1 = x', x⊕x=0x \oplus x = 0, x⊕x′=1x \oplus x' = 1, x(y⊕z)=xy⊕xzx(y \oplus z) = xy \oplus xz, and x+y=x⊕y⊕xyx + y = x \oplus y \oplus xy. An nn-input XOR is 1 exactly when an odd number of inputs are 1 (the parity function), so it is 1 on half of the rows (2n−12^{n-1}). Complementing one input complements the output: (x⊕y)′=x′⊕y=x⊕y′(x \oplus y)' = x' \oplus y = x \oplus y'.

Shannon expansion. For any function and variable xx: f=x⋅f(x=1)+x′⋅f(x=0)f = x \cdot f(x{=}1) + x' \cdot f(x{=}0). It is the basis of multiplexer implementations.

No cancellation. From x+y=x+zx + y = x + z you cannot conclude y=zy = z, and likewise for xy=xzxy = xz (take x=1x = 1 for the first, x=0x = 0 for the second). Only if both hold can you cancel.

How it works

There is no hidden mechanism here: an identity is true if and only if its truth table is the same on both sides, so any claim can be checked mechanically. The program below checks four identities by looping over all assignments, exactly as a truth table does.

#include <stdio.h>
 
int main(void) {
    int de_morgan = 1, absorb = 1, simplify = 1, distribute = 1;
    printf("A B | A+A'B  A+B | AB+AB'  A\n");
    for (int a = 0; a < 2; a++) {
        for (int b = 0; b < 2; b++) {
            int lhs = a || (!a && b);
            int rhs = a || b;
            int c1 = (a && b) || (a && !b);
            printf("%d %d |   %d      %d  |   %d      %d\n", a, b, lhs, rhs, c1, a);
            if (lhs != rhs) simplify = 0;
            if (c1 != a) absorb = 0;
            if (!(a && b) != (!a || !b)) de_morgan = 0;
            for (int c = 0; c < 2; c++)
                if ((a || (b && c)) != ((a || b) && (a || c))) distribute = 0;
        }
    }
    printf("De Morgan %d, combining %d, A+A'B=A+B %d, OR distributes over AND %d\n", de_morgan, absorb, simplify, distribute);
    return 0;
}
A B | A+A'B  A+B | AB+AB'  A
0 0 |   0      0  |   0      0
0 1 |   1      1  |   0      0
1 0 |   1      1  |   1      1
1 1 |   1      1  |   1      1
De Morgan 1, combining 1, A+A'B=A+B 1, OR distributes over AND 1

The columns for A+A′BA + A'B and A+BA + B are identical, which proves the simplification law. The columns AB+AB′AB + AB' and AA are identical, which proves the combining law.

Step through three identities and one non-identity. Each table fills in one input row at a time, with the sub-expressions as separate columns, and the last step compares the two sides. Every cell is computed by a script, not typed in.

De Morgan: (AB)' = A' + B'

Computed exactly, not typed
ABAB(AB)'A'B'A'+B'
00·····
01·····
10·····
11·····

Step 0

Claim: the complement of AND is the OR of the complements. Step through the rows; the highlighted columns are the two sides.

0 / 5
computed by script: exact integer, Fraction and truth-table evaluation (IEEE 754 patterns via Python struct where used), not typed by hand. python3 scripts/gen-dl-traces.py

Simplification: A + A'B = A + B

Computed exactly, not typed
ABA'A'BA+A'BA+B
00····
01····
10····
11····

Step 0

Claim: once A is 1 the term A'B can add nothing, and when A is 0 it contributes exactly B. Step through the rows to check.

0 / 5
computed by script: exact integer, Fraction and truth-table evaluation (IEEE 754 patterns via Python struct where used), not typed by hand. python3 scripts/gen-dl-traces.py

Consensus: AB + A'C + BC = AB + A'C

Computed exactly, not typed
ABCABA'CBCAB+A'C+BCAB+A'C
000·····
001·····
010·····
011·····
100·····
101·····
110·····
111·····

Step 0

Claim: the term BC is redundant. Watch the BC column: wherever it is 1, one of AB or A'C is already 1.

0 / 9
computed by script: exact integer, Fraction and truth-table evaluation (IEEE 754 patterns via Python struct where used), not typed by hand. python3 scripts/gen-dl-traces.py

The last table shows why "dual" and "complement" must not be confused: the dual of F=AB+C′F = AB + C' (swap the operators, keep the literals) is a different function from its complement, even though the dual does equal the complement of FF evaluated at complemented inputs.

The dual is not the complement

Computed exactly, not typed
ABCF=AB+C'dual (A+B)C'complement (A'+B')CF(A',B',C')'
000····
001····
010····
011····
100····
101····
110····
111····

Step 0

Claim: for F = AB + C' the dual and the complement are different functions, but the dual equals the complement of F evaluated at the complemented inputs (last column).

0 / 9
computed by script: exact integer, Fraction and truth-table evaluation (IEEE 754 patterns via Python struct where used), not typed by hand. python3 scripts/gen-dl-traces.py

Method for simplification by algebra. Look for, in this order: common factors (distribute and combine), the pattern x+x′yx + x'y (replace by x+yx + y), absorption x+xyx + xy, the consensus term yzyz in xy+x′z+yzxy + x'z + yz (delete it), then De Morgan to push complements down to single variables. If a result is not obviously minimal, switch to a Karnaugh map; algebra is quick when a pattern is visible and unreliable otherwise.

Worked examples

EX 1Combining

Easy

Simplify F=AB+AB′F = AB + AB'.

Step 1. Factor out AA: F=A(B+B′)F = A(B + B').

Step 2. The complement law gives B+B′=1B + B' = 1.

Step 3. F=A⋅1=AF = A \cdot 1 = A. (The truth-table program confirms it.)

EX 2Repeated use of x + x'y = x + y

Medium

Simplify F=A+A′B+A′B′CF = A + A'B + A'B'C.

Step 1. Apply x+x′y=x+yx + x'y = x + y to the first two terms: A+A′B=A+BA + A'B = A + B. So F=A+B+A′B′CF = A + B + A'B'C.

Step 2. The last term is A′B′C=(A+B)′CA'B'C = (A+B)'C by De Morgan. Take X=A+BX = A + B; the expression is X+X′C=X+CX + X'C = X + C.

Step 3. F=A+B+CF = A + B + C. Check: F=0F = 0 only when A=B=C=0A = B = C = 0, and the original is also 0 only there.

EX 3Consensus theorem

Medium

Simplify F=AB+A′C+BCF = AB + A'C + BC.

Step 1. The term BCBC is the consensus of ABAB and A′CA'C (the variable AA appears in true form in one term and complemented in the other, and BCBC is the product of the other literals).

Step 2. It is redundant: F=AB+A′CF = AB + A'C.

Proof of the theorem. BC=BC(A+A′)=ABC+A′BCBC = BC(A + A') = ABC + A'BC, and ABCABC is absorbed by ABAB, while A′BCA'BC is absorbed by A′CA'C.

EX 4Complement of an expression

GATE level

Find F′F' for F=AB′+AC+A′BF = AB' + AC + A'B and simplify.

Step 1 (truth table). F=1F = 1 for (A,B,C)(A,B,C) in {010,011,100,101,111}\{010, 011, 100, 101, 111\}. So F=0F = 0 for 000, 001 and 110.

Step 2. Those rows are A′B′C′+A′B′C+ABC′A'B'C' + A'B'C + ABC'. Combine the first two: A′B′A'B'. So F′=A′B′+ABC′F' = A'B' + ABC'.

Step 3 (check by De Morgan). F′=(AB′)′(AC)′(A′B)′=(A′+B)(A′+C′)(A+B′)F' = (AB')'(AC)'(A'B)' = (A' + B)(A' + C')(A + B'). Multiply out: the product (A′+B)(A+B′)=A′B′+AB(A'+B)(A+B') = A'B' + AB, and with (A′+C′)(A' + C') gives A′B′+ABC′A'B' + ABC' again (since A′B′A′=A′B′A'B'A' = A'B' and ABC′ABC' remains, while the other products vanish).

EX 5Dual versus complement

GATE level

Let F=AB+C′F = AB + C'. Dual: swap ++ and ⋅\cdot, keep literals: Fd=(A+B)C′F^d = (A + B)C'. Complement: F′=(A′+B′)CF' = (A' + B')C.

They are different functions. For A=B=C=0A = B = C = 0: Fd=(0)(1)=0F^d = (0)(1) = 0 and F′=(1)(0)=0F' = (1)(0) = 0 agree, but for A=1,B=0,C=0A = 1, B = 0, C = 0: Fd=(1)(1)=1F^d = (1)(1) = 1 while F′=(1)(0)=0F' = (1)(0) = 0. The identity Fd(x)=(F(x′))′F^d(x) = (F(x'))' holds: for that input F(0,1,1)=0⋅1+0=0F(0, 1, 1) = 0\cdot 1 + 0 = 0, and its complement is 1, matching FdF^d.

EX 6Counting functions

GATE level

(a) The number of Boolean functions of 3 variables is 223=2562^{2^3} = 256.

(b) The number with exactly 3 true rows is (83)=56\binom{8}{3} = 56.

(c) A function is self-dual when F(x′)=(F(x))′F(x') = (F(x))': the rows ii and 7−i7 - i (complementary inputs) must have opposite outputs. Choose the outputs of 4 of the pairs freely: 24=162^4 = 16 self-dual functions of 3 variables.

(d) Of the 16 functions of 2 variables, 10 depend on both inputs. The other 6 are the constants 0 and 1, and AA, A′A', BB, B′B'.

EX 7A parity chain

GATE level

How many of the 16 input combinations of F=A⊕B⊕C⊕DF = A \oplus B \oplus C \oplus D give F=1F = 1? The XOR of four inputs is 1 when an odd number of inputs is 1: (41)+(43)=4+4=8=24−1\binom{4}{1} + \binom{4}{3} = 4 + 4 = 8 = 2^{4-1}. Complementing one input flips FF on every row.

Cheat box

Cheat box

  • x+0=xx + 0 = x, x⋅1=xx \cdot 1 = x, x+1=1x + 1 = 1, x⋅0=0x \cdot 0 = 0, x+x=xx + x = x, xx=xx x = x, x+x′=1x + x' = 1, xx′=0x x' = 0.
  • x+xy=xx + xy = x, x(x+y)=xx(x+y) = x, x+x′y=x+yx + x'y = x + y, x(x′+y)=xyx(x'+y) = xy, xy+xy′=xxy + xy' = x.
  • Consensus: xy+x′z+yz=xy+x′zxy + x'z + yz = xy + x'z and (x+y)(x′+z)(y+z)=(x+y)(x′+z)(x+y)(x'+z)(y+z) = (x+y)(x'+z).
  • De Morgan: (xy)′=x′+y′(xy)' = x' + y', (x+y)′=x′y′(x+y)' = x'y' (any number of variables).
  • x+yz=(x+y)(x+z)x + yz = (x+y)(x+z).
  • Dual: swap ++ with ⋅\cdot and 00 with 11, keep literals. Complement: dual with every literal complemented.
  • XOR: x⊕y=xy′+x′yx \oplus y = xy' + x'y. Odd-parity function. x⊕1=x′x \oplus 1 = x', x⊕x=0x \oplus x = 0.
  • 22n2^{2^n} functions of nn variables; 22n−12^{2^{n-1}} of them self-dual; (2nk)\binom{2^n}{k} with exactly kk true rows.
  • Precedence: NOT, AND, OR.

Traps and GATE patterns

Connections

The expressions here become circuits in logic gates; the sum-of-products and product-of-sums forms built from minterms and maxterms are in SOP, POS, minterms and maxterms; systematic simplification is the Karnaugh map; and the statement that NAND (or NOR) alone is enough is in functional completeness and duality. The operators &, |, ^, ~ in C are this algebra applied to every bit of a word, see C types and operators.

PYQs

15 previous year questions from your book. I re-solved each one myself (15 by running or simulating, 0 by reasoning only); the book's key is shown next to my answer. All PYQs

GATE 2026 · Set 1 · MSQ · 1 markQ1 · page 164 of the book
Consider the Boolean expression

F(P, Q) = (P̅ + Q) ⊕(P̅Q).
Which
of
the
following expressions is equivalent to F?
  • (a)P⊕Q
  • (b)P⊕Q
  • (c)P ̅ ⊕Q
  • (d)P ̅ ⊕Q ̅
GATE 2026 · Set 2 · MCQ · 1 markQ4 · page 164 of the book
Which one of the following options is not a property
of Boolean Algebra?
  • (a)a + b = b + a
  • (b)a · a' = 1
  • (c)a + a' = 1
  • (d)a · b = b · a
GATE 2025 · Set 2 · MSQQ5 · page 164 of the book
Which of the following Boolean algebraic
equation(s) is/are CORRECT?
  • (a)A ̅BC+ AB ̅C ̅ + A ̅B ̅C ̅ + AB ̅C+ ABC= BC+ B ̅C ̅ + A ̅B ̅
  • (b)AB+ A ̅C+ BC= AB+ A ̅C
  • (c)(A+ C)(A ̅ + B) = AB+ A ̅C
  • (d)(A+ B ̅ + D ̅ )(C+ D)(A ̅ + C+ D)(A+ B+ D ̅ ) = A ̅D+ C ̅D ̅
GATE 2025 · Set 1 · MSQ · 1 markQ6 · page 164 of the book
Let X be a 3-variable Boolean function that produces
output as '1' when at least two of the         input
variables are '1'. Which of the following statement(s)
is/are CORRECT, where a, b, c, d, e are Boolean
variables?
  • (a)X(a, b, X(c, d, e)) = X(X(a, b, c), d, e)
  • (b)X(a, b, X(a, b, c)) = X(a, b, c)
  • (c)X(a, b, X(a, c, d)) = (X(a, b, a) AND X(c, d, c))
  • (d)X(a, b, c) = X(a, X(a, b, c), X(a, c, c))
GATE 2024 · Set 2 · MSQQ7 · page 164 of the book
For a Boolean variable x, which of the following
statements is/are FALSE?
  • (a)x · 1 = x
  • (b)x + 1 = x
  • (c)x · x = 0
  • (d)x + x̅ = 1 DIGITAL LOGIC
GATE 2021 · Set 1 · MSQ · 2 marksQ9 · page 165 of the book
Consider the following Boolean expression.

F = (X + Y + Z)(X̅ + Y)(Y̅ + Z)

Which of the following Boolean expressions is/are
equivalent to F̅ (complement of F)?
  • (a)(X̅ + Y̅ + Z̅)(X + Y̅)(Y + Z̅)
  • (b)XY̅ + Z̅
  • (c)(X + Z̅)(Y̅ + Z̅)
  • (d)XY̅ + YZ̅ + X̅Y̅Z̅
GATE 2019 · MCQ · 1 markQ10 · page 165 of the book
Which one of the following is NOT a valid
identity?
  • (a)(x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)
  • (b)(x + y) ⊕ z = x ⊕ (y + z)
  • (c)x ⊕ y = x + y, if xy = 0
  • (d)x ⊕ y = (xy + x'y')'
GATE 2018 · MCQ · 1 markQ11 · page 165 of the book
Let ⊕ and ⊙ denote the Exclusive OR and
Exclusive NOR operations, respectively. Which one
of the following is NOT CORRECT?
  • (a)(P ⊕ Q)̅̅̅̅̅̅̅̅̅̅̅̅ = P ⊙ Q
  • (b)P̅ ⊕ Q = P ⊙ Q
  • (c)P̅ ⊕ Q̅ = P ⊕ Q
  • (d)P ⊕ P̅ ⊕ Q = (P ⊙ P̅ ⊙ Q̅)
GATE 2017 · Set 2 · MCQQ12 · page 165 of the book
If w, x, y, z are Boolean variables, then which one of
the following is INCORRECT?
  • (a)wx + w(x + y) + x(x + y) = x + wy
  • (b)(wx̄(y + z̄))' + w̄x = w̄ + x + ȳz
  • (c)(wx̄(y + xz̄) + w̄x̄)y = xȳ
  • (d)(w + y)(wxy + wyz) = wxy + wyz
GATE 2016 · Set 2 · MCQ · 1 markQ13 · page 165 of the book
Let, x1 ⊕ x2 ⊕ x3 ⊕ x4 = 0 where x1, x2, x3, x4 are
Boolean variables, and ⊕ is the XOR operator.
Which one of the following must always be TRUE?
  • (a)x1x2x3x4 = 0
  • (b)x1x3 + x2 = 0
  • (c)x ̅1 ⊕x ̅3 = x ̅2 ⊕x ̅4
  • (d)x1 + x2 + x3 + x4 = 0
GATE 2016 · Set 1 · MCQQ14 · page 165 of the book
Consider the Boolean operator # with the following
properties:
         x # 0 = x
         x # 1 = x̅
         x # x = 0
         x # x̅ = 1

Then x # y is equivalent to
  • (a)xȳ + x̅y
  • (b)xȳ + x̅ȳ
  • (c)x̅y + xy
  • (d)xy + x̅ y̅ DIGITAL LOGIC
GATE 2014 · Set 3 · MCQQ17 · page 166 of the book
Let ⊕ denote the exclusive OR (XOR) operation.
Let '1' and '0' denote the binary constants. Consider
the following Boolean expression for F over two
variables P and Q:

F(P, Q) = ((1 ⊕ P) ⊕ (P ⊕ Q)) ⊕ ((P ⊕ Q) ⊕ (Q
⊕ 0))

The equivalent expression for F is
  • (a)P + Q
  • (b)(P + Q)̅̅̅̅̅̅̅̅̅̅̅̅
  • (c)P ⊕ Q
  • (d)(P ⊕ Q)̅̅̅̅̅̅̅̅̅̅̅̅
GATE 2008 · MCQQ23 · page 167 of the book
If P, Q, R are Boolean variables, then

(P + Q̅)(P·Q̅ + P·R)(P̅·R + Q̅) simplifies to
  • (a)P·Q̅
  • (b)P·R
  • (c)P·Q̅ + R
  • (d)P·R̅ + Q
GATE 2007 · MCQ · 2 marksQ25 · page 167 of the book
Define the connective * for the Boolean variables X
and Y as:
            X * Y = XY + X'Y'.

Let Z = X * Y. Consider the following expressions
P, Q and R.
                P: X = Y * Z,
                Q: Y = X * Z,
                R: X * Y * Z = 1

Which of the following is TRUE?
  • (a)Only P and Q are valid.
  • (b)Only Q and R are valid.
  • (c)Only P and R are valid.
  • (d)All P, Q, R are valid.
GATE 2005 · MCQ · 1 markQ29 · page 168 of the book
Which of the following expressions is equivalent
to (A ⊕ B) ⊕ C ?
  • (a)(A + B + C)(A̅ + B̅ + C̅)
  • (b)(A + B + C)(A̅ + B̅ + C)
  • (c)ABC + A̅(B ⊕ C) + B̅(A ⊕ C)
  • (d)None of these

Self-check

Question 1

Simplify F=(A+B)(A+B′)(A′+C)F = (A + B)(A + B')(A' + C).

Show answer

(A+B)(A+B′)=A(A + B)(A + B') = A (combining). Then A(A′+C)=ACA(A' + C) = AC by x(x′+y)=xyx(x'+y) = xy. So F=ACF = AC.

Question 2

What is the dual of F=A′B+AC′+0F = A'B + AC' + 0?

Show answer

Swap ++ and ⋅\cdot and swap 0 with 1, keeping literals: Fd=(A′+B)(A+C′)⋅1=(A′+B)(A+C′)F^d = (A' + B)(A + C') \cdot 1 = (A' + B)(A + C').

Question 3

How many Boolean functions of 4 variables are self-dual?

Show answer

224−1=28=2562^{2^{4-1}} = 2^8 = 256.

Question 4

Is A⊕B⊕AB=A+BA \oplus B \oplus AB = A + B true?

Show answer

Yes: on (0,0)(0,0) both sides are 0; on (0,1)(0,1) and (1,0)(1,0) both are 1; on (1,1)(1,1) the left is 0⊕1=10 \oplus 1 = 1 and the right is 1. This is the identity x+y=x⊕y⊕xyx + y = x \oplus y \oplus xy.

Revision card

One-screen revision

  • Two expressions are equal iff their truth tables are equal. 22n2^{2^n} functions of nn variables.
  • Absorption x+xy=xx + xy = x; x+x′y=x+yx + x'y = x + y; combining xy+xy′=xxy + xy' = x; consensus term can be deleted.
  • De Morgan: swap AND and OR, complement each literal. Dual: swap AND and OR (and 0, 1), literals unchanged.
  • x+yz=(x+y)(x+z)x + yz = (x+y)(x+z).
  • XOR is odd parity; x⊕x=0x \oplus x = 0; x⊕1=x′x \oplus 1 = x'; AND distributes over XOR, OR does not.
  • No cancellation from x+y=x+zx + y = x + z alone.
  • Precedence NOT, AND, OR.

References

  • ·Mano and Ciletti, Digital Design, 5th ed., Chapter 2 Boolean Algebra and Logic Gates (postulates, theorems, Boolean functions, canonical forms)
  • ·Kohavi and Jha, Switching and Finite Automata Theory, Boolean algebra and switching functions

Verification

Every identity, the duality statements, the counts of functions (including the self-dual counts) and every worked-example simplification are checked over all truth-table assignments in scripts/enum-checks/dl_boolean.py. The C program is compiled and run by npm run verify:c. The textbook chapter titles are from memory and not checked against the books. The four truth-table animations are computed by scripts/gen-dl-traces.py and checked in tests/dl-traces.test.ts. The independent second pass has not been run yet, so the page stays draft. SECOND PASS (2026-11-02, done by the assistant, not a human check): every Self-check question was solved before the printed answer was read and all agreed; the definitions, worked examples, cheat box and traps were read claim by claim and the numbers re-derived by hand or by a small script (conversions, signed ranges and flags, IEEE 754 fields and custom formats, Boolean identities and counts, K-map groups, adder carries, BCD correction, flip-flop conversions, counter sequences and T equations, state reduction, Quine-McCluskey rounds and covers, floating-point alignment and rounding); long C programs were not re-read line by line (they are compiled and compared by npm run verify:c, and their printed outputs were checked against the prose); tables and animations are machine output and were read, not re-run; No other defect found. Status raised to self-checked; verified needs a textbook or human check.

last verified: never