UNIHIVE

Study Hub UNIPORT PHY 452

PHY 452 · Electronics

Boolean algebra and logic gates

The basic gates and their truth tables, Boolean laws and theorems, De Morgan's theorems and universal gates.

Our notes

2 min read

Basic gates

GateExpressionOutput is 1 when
ANDY = A·Ball inputs are 1
ORY = A + Bany input is 1
NOTY = A'the input is 0
NANDY = (A·B)'not all inputs are 1
NORY = (A + B)'all inputs are 0
XORY = A ⊕ Binputs differ
XNORY = (A ⊕ B)'inputs are the same

Here A' means "NOT A" (often written with a bar over the letter).

Truth table for two inputs

ABANDORNANDNORXOR
0000110
0101101
1001101
1111000

Laws of Boolean algebra

  • Identity: A + 0 = A; A·1 = A.
  • Null: A + 1 = 1; A·0 = 0.
  • Idempotent: A + A = A; A·A = A.
  • Complement: A + A' = 1; A·A' = 0.
  • Double negation: (A')' = A.
  • Commutative, associative, distributive: A(B + C) = AB + AC; also A + BC = (A + B)(A + C).
  • Absorption: A + AB = A; A(A + B) = A; A + A'B = A + B.

De Morgan's theorems

  • (A + B)' = A'·B'
  • (A·B)' = A' + B'

"Break the bar and change the sign."

Simplification examples

  1. AB + AB' = A(B + B') = A.
  2. A + AB = A(1 + B) = A.
  3. (A + B)(A + B') = A + BB' = A.
  4. A'B + AB + AB' = B(A' + A) + AB' = B + AB' = B + A.

Universal gates

NAND and NOR can each make every other gate:

  • NOT from NAND: join both inputs.
  • AND: NAND followed by a NAND inverter.
  • OR: invert each input with NAND, then NAND them (by De Morgan).

Manufacturers make whole circuits from NAND gates because they are cheap and fast.

Canonical forms

  • Sum of products (SOP): OR of AND terms, from the rows where Y = 1 (minterms).
  • Product of sums (POS): AND of OR terms, from the rows where Y = 0 (maxterms).

Exams usually ask

  • Simplify Boolean expressions using the laws.
  • Prove De Morgan's theorems by truth table; build gates from NAND.

Common mistake

Thinking (A·B)' = A'·B'. By De Morgan it is A' + B'.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

No reading links here yet

Our team adds free books, videos and practice for each topic, and opens every link before it goes up.

All PHY 452 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.