Digital Logic and Microprocessor · 10 min read

Digital logic

Digital systems represent information with two discrete levels, 0 and 1. To design or analyse them you must be able to convert between number systems, know how logic levels and gates behave, simplify Boolean expressions, and turn a truth table into a minimal circuit using Sum-of-Products, Product-of-Sums and Karnaugh maps. These skills are tested through short conversion and simplification questions.

Key concepts

  • Number systems:
SystemBaseDigitsExample
Binary20, 11011₂ = 11₁₀
Octal80–713₈ = 11₁₀
Decimal100–911
Hexadecimal160–9, A–FB₁₆ = 11₁₀
  • Decimal to base-r: repeatedly divide by r and read remainders bottom-up; for fractions, multiply by r and read integer parts top-down.
  • Binary ↔ octal: group 3 bits; binary ↔ hex: group 4 bits, starting from the binary point.
  • Codes: BCD (each decimal digit in 4 bits; 1010–1111 invalid), Gray code (only one bit changes between successive values; used in encoders and K-map ordering), Excess-3, ASCII (7-bit).
  • Logic levels: Positive logic means high voltage = 1. For TTL, a valid input low is ≤ 0.8 V and input high ≥ 2.0 V; output low ≤ 0.4 V and output high ≥ 2.4 V (supply 5 V). The difference between guaranteed output and required input levels is the noise margin (0.4 V for TTL). Other characteristics: fan-out, propagation delay, power dissipation.
  • Logic gates:
GateExpressionOutput is 1 when
ANDABABall inputs 1
ORA+BA+Bany input 1
NOTAˉ\bar Ainput 0
NANDAB‾\overline{AB}any input 0
NORA+B‾\overline{A+B}all inputs 0
XORA⊕BA\oplus Binputs differ (odd number of 1s)
XNORA⊕B‾\overline{A\oplus B}inputs equal

NAND and NOR are universal gates: any logic function can be built from either one alone.

  • Boolean algebra laws: identity (A+0=AA+0=A, A⋅1=AA\cdot1=A), null (A+1=1A+1=1, A⋅0=0A\cdot0=0), idempotent (A+A=AA+A=A), complement (A+Aˉ=1A+\bar A=1, AAˉ=0A\bar A=0), involution (Aˉˉ=A\bar{\bar A}=A), commutative, associative, distributive (A+BC=(A+B)(A+C)A+BC=(A+B)(A+C)), absorption (A+AB=AA+AB=A, A(A+B)=AA(A+B)=A), and A+AˉB=A+BA+\bar AB = A+B.
  • De Morgan's theorems: A+B‾=AˉBˉ\overline{A+B}=\bar A\bar B and AB‾=Aˉ+Bˉ\overline{AB}=\bar A+\bar B. "Break the bar, change the sign."
  • Duality: Swap AND↔OR and 0↔1 to get the dual of any valid identity.
  • Sum-of-Products (SOP): OR of AND terms; each row of the truth table where output = 1 gives a minterm mim_i. Canonical form: F=∑m(… )F=\sum m(\dots). Implemented naturally with AND-OR or NAND-NAND.
  • Product-of-Sums (POS): AND of OR terms; each row with output = 0 gives a maxterm MiM_i. F=∏M(… )F=\prod M(\dots). Implemented with OR-AND or NOR-NOR.
  • Karnaugh map: A grid arranged in Gray-code order so that adjacent cells differ by one variable. An n-variable map has 2n2^n cells. Group 1s (for SOP) or 0s (for POS) in rectangles of 1, 2, 4, 8… cells, making groups as large as possible; groups may wrap around edges and overlap. A group of 2k2^k cells eliminates kk variables. "Don't care" (X) cells may be treated as 1 or 0, whichever gives a simpler result.

High-yield points

  • NAND and NOR are universal gates.
  • De Morgan: A+B‾=AˉBˉ\overline{A+B} = \bar A\bar B, AB‾=Aˉ+Bˉ\overline{AB} = \bar A + \bar B.
  • A+AB=AA + AB = A and A+AˉB=A+BA + \bar AB = A + B.
  • TTL: input low ≤ 0.8 V, input high ≥ 2.0 V; noise margin 0.4 V.
  • A K-map group of 2k2^k cells eliminates kk variables.
  • nn variables give 22n2^{2^n} possible Boolean functions.

Formulas

N10=∑idi riN_{10} = \sum_i d_i\, r^{i} did_i = digit at position ii, rr = base (radix).

Number of possible Boolean functions of nn variables: 22n2^{2^n}.

Worked example

Simplify F(A,B,C)=∑m(0,2,4,5,6)F(A,B,C)=\sum m(0,2,4,5,6).

  1. Truth-table 1s at 000, 010, 100, 101, 110.
  2. K-map: cells 0, 2, 4, 6 all have C=0C=0 → group of 4 gives Cˉ\bar C.
  3. Cells 4 and 5 (A=1,B=0A=1,B=0) → group of 2 gives ABˉA\bar B.
  4. F=Cˉ+ABˉF=\bar C + A\bar B.
  5. Check row 101: Cˉ=0\bar C=0, ABˉ=1A\bar B=1 → F=1 ✓; row 011 (m3): Cˉ=0\bar C=0, ABˉ=0A\bar B=0 → F=0 ✓.

Conversion check: (2F)16=2×16+15=4710=1011112(2F)_{16} = 2\times16+15 = 47_{10} = 101111_2.

Exam tips

  • NAND and NOR are universal; XOR is not.
  • 1's complement inverts bits; 2's complement = 1's complement + 1 (covered further in arithmetic circuits).
  • A K-map group of 8 in a 4-variable map leaves one literal.
  • Minterms come from output 1; maxterms from output 0. ∑m(… )\sum m(\dots) and ∏M(… )\prod M(\dots) of the same function use complementary index sets.
  • XOR of an odd number of 1s is 1 — used for parity generators.

Exam-style questions

From Calmon's question bank, which has 29 questions on this topic.

1. Convert (312)₈ into decimal:

  • A. (200)₁₀
  • B. (202)₁₀
  • C. (204)₁₀
  • D. (206)₁₀

Answer: B. Converting (312)₈ to decimal gives 3x64 + 1x8 + 2x1 = 202₁₀.

2. Which of the following does Boolean algebra NOT have?

  • A. Complement of each element
  • B. Identity element for the AND operation
  • C. Multiplicative inverse
  • D. Distributive law of AND over OR

Answer: C. Boolean algebra has complements (a+aˉ=1a + \bar{a} = 1), identities (1 for AND, 0 for OR) and distributive laws, but no multiplicative inverse (no a−1a^{-1} with a⋅a−1=1a \cdot a^{-1} = 1 for a=0a = 0).

Practise AExE02 questions →

read it. practise it. pass it.

a free account adds chapter-wise practice, mock tests in the real exam pattern and a daily study plan.

create free account →