PHY 452 · Electronics
Our notes
2 min readLogic design steps
- State the problem in words and name inputs and outputs.
- Write the truth table.
- Write the Boolean expression (SOP from the 1s).
- Minimise it.
- Draw the circuit with the fewest gates (often in NAND only).
Karnaugh maps
A K-map is a grid of the truth table arranged in Gray code order (00, 01, 11, 10), so neighbouring cells differ in one variable. Grouping neighbouring 1s eliminates variables.
Rules for grouping
- Groups must contain 1, 2, 4, 8 ... cells (powers of 2), in rectangles.
- Make groups as large as possible and as few as possible.
- Groups may overlap and wrap around the edges (the map is like a cylinder or doughnut).
- Every 1 must be in at least one group.
- In a group, variables that change are eliminated; those that stay the same remain.
Worked example (3 variables)
F(A, B, C) = Σm(1, 3, 5, 6, 7).
| BC=00 | 01 | 11 | 10 | |
|---|---|---|---|---|
| A=0 | 0 | 1 | 1 | 0 |
| A=1 | 0 | 1 | 1 | 1 |
- A group of four 1s where C = 1 (cells 1, 3, 5, 7) gives C.
- A pair of cells 6 and 7 (A = 1, B = 1) gives AB.
- F = C + AB. Check: F is 1 when C = 1 (minterms 1, 3, 5, 7) or when A = B = 1 (6, 7): exactly the given minterms.
Four variables
A 4 × 4 map; a group of 8 leaves one variable, a group of 4 two, a pair three. The four corners form a group.
Don't-care conditions
Input combinations that never happen (for example BCD codes 1010 to 1111) are marked X and may be counted as 1 or 0, whichever gives bigger groups.
Design example: majority voter
Output 1 when at least two of three inputs are 1. Minterms 3, 5, 6, 7 give Y = AB + BC + AC. Used in safety systems with three sensors.
Hazards
When two groups touch but do not overlap, a brief false output (glitch) can occur as inputs change; adding a redundant covering group removes it.
Exams usually ask
- Minimise a 3- or 4-variable function with a K-map.
- Design a logic circuit from a word problem.
Common mistake
Making groups of three or six. Groups must have 1, 2, 4, 8 or 16 cells.
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.