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:
| System | Base | Digits | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1011₂ = 11₁₀ |
| Octal | 8 | 0–7 | 13₈ = 11₁₀ |
| Decimal | 10 | 0–9 | 11 |
| Hexadecimal | 16 | 0–9, A–F | B₁₆ = 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:
| Gate | Expression | Output is 1 when |
|---|---|---|
| AND | all inputs 1 | |
| OR | any input 1 | |
| NOT | input 0 | |
| NAND | any input 0 | |
| NOR | all inputs 0 | |
| XOR | inputs differ (odd number of 1s) | |
| XNOR | inputs equal |
NAND and NOR are universal gates: any logic function can be built from either one alone.
- Boolean algebra laws: identity (, ), null (, ), idempotent (), complement (, ), involution (), commutative, associative, distributive (), absorption (, ), and .
- De Morgan's theorems: and . "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 . Canonical form: . Implemented naturally with AND-OR or NAND-NAND.
- Product-of-Sums (POS): AND of OR terms; each row with output = 0 gives a maxterm . . 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 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 cells eliminates 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: , .
- and .
- TTL: input low ≤ 0.8 V, input high ≥ 2.0 V; noise margin 0.4 V.
- A K-map group of cells eliminates variables.
- variables give possible Boolean functions.
Formulas
= digit at position , = base (radix).
Number of possible Boolean functions of variables: .
Worked example
Simplify .
- Truth-table 1s at 000, 010, 100, 101, 110.
- K-map: cells 0, 2, 4, 6 all have → group of 4 gives .
- Cells 4 and 5 () → group of 2 gives .
- .
- Check row 101: , → F=1 ✓; row 011 (m3): , → F=0 ✓.
Conversion check: .
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. and 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 (), identities (1 for AND, 0 for OR) and distributive laws, but no multiplicative inverse (no with for ).
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 →