7.4 Logic Circuits, Switching Theory & Microprocessor Systems
Key Takeaways
Enhanced TOS topic C of ESAS bundles Computer Programming, Microprocessor Systems, and Logic Circuits & Switching Theory into 4.5% of the exam and 15 of the 100 ESAS items.
A Karnaugh map minimises a Boolean function by grouping adjacent 1-cells in powers of two; each group of 2^k cells eliminates k variables from that product term.
NAND and NOR are functionally complete gates — any Boolean function can be built from either alone, which is why real silicon is NAND-dominated.
A latch is level-sensitive while a flip-flop is edge-triggered; n cascaded flip-flops form a ripple counter with 2^n states.
A microprocessor executes the fetch-decode-execute cycle over address, data and control buses; an n-bit address bus can address 2^n distinct memory locations.
7.4 Logic Circuits, Switching Theory & Microprocessor Systems
Topic C of the Engineering Sciences and Allied Subjects TOS (PRBEE Resolution No. 40, s. 2024) is Computer Programming, Microprocessor Systems and Logic Circuits and Switching Theory, weighted 4.5% of the whole examination and 15 of the 100 ESAS items — one of the two largest ESAS topics. The preceding section covered number systems, Boolean algebra fundamentals and structured programming; this section completes the topic with switching-theory minimisation, sequential logic and microprocessor architecture, all of which underpin the PLC and protection-relay logic examined in the professional subject.
1. Switching Theory & Boolean Minimisation
De Morgan's Theorems
The two identities that convert between AND and OR forms, and the basis of "bubble pushing":
Canonical Forms
- Sum of Products (SOP) — an OR of AND terms, one minterm per row where the output is 1;
- Product of Sums (POS) — an AND of OR terms, one maxterm per row where the output is 0.
Karnaugh Map Minimisation
A K-map arranges minterms so that physically adjacent cells differ in exactly one variable (Gray-code ordering). Rules:
- Group adjacent 1-cells in blocks of — powers of two only;
- Make each group as large as possible; a group of cells eliminates variables;
- Groups may overlap and may wrap around the edges of the map;
- Every 1-cell must be covered at least once; use the fewest groups possible;
- Don't-care cells () may be included in a group when doing so enlarges it, or ignored otherwise.
Universal Gates
| Gate | Expression | Notes |
|---|---|---|
| AND | Output 1 only when all inputs are 1 | |
| OR | Output 1 when any input is 1 | |
| NAND | Functionally complete | |
| NOR | Functionally complete | |
| XOR | Output 1 when inputs differ; the parity/half-adder sum gate | |
| XNOR | Output 1 when inputs agree; the equality comparator |
NAND and NOR are each functionally complete: NOT, AND and OR can all be synthesised from either alone. Because a CMOS NAND is cheaper in silicon than an AND, real integrated logic is overwhelmingly NAND-based.
2. Combinational Logic Blocks
| Block | Function | Sizing rule |
|---|---|---|
| Half adder | Sum , Carry | No carry-in |
| Full adder | Sum , | Cascade for an -bit ripple adder |
| Multiplexer (MUX) | Selects 1 of inputs | select lines |
| Demultiplexer | Routes 1 input to 1 of outputs | select lines |
| Decoder | inputs drive mutually exclusive outputs | Address decoding |
| Encoder | inputs produce an -bit code | Priority encoders resolve simultaneous inputs |
3. Sequential Logic
The defining distinction: combinational output depends only on present inputs; sequential output depends on present inputs and stored state.
| Element | Behaviour | Characteristic equation |
|---|---|---|
| SR latch | Set/Reset; is forbidden | — |
| D flip-flop | Output follows D at the clock edge | |
| JK flip-flop | toggles — no forbidden state | |
| T flip-flop | Toggles when |
A latch is level-sensitive (transparent while the enable is asserted); a flip-flop is edge-triggered. Confusing the two is a standard distractor.
Cascading flip-flops produces a counter with states, so a 4-bit counter counts 0–15 and a modulo-10 (decade) counter needs 4 flip-flops with a reset decoded at count 10. A shift register of stages delays serial data by clock periods.
Finite state machines come in two flavours: a Moore machine's output depends on the state only; a Mealy machine's output depends on state and current input, so it reacts one clock earlier but is more prone to output glitches.
4. Microprocessor Systems
A microprocessor repeats the fetch–decode–execute cycle across three buses:
- Address bus — unidirectional, sets the location; address lines address locations, so 16 lines reach 64 Ki locations and 20 lines reach 1 Mi;
- Data bus — bidirectional, carries the operand; its width defines the machine's word size;
- Control bus — read/write strobes, interrupt requests, clock and reset.
Key architectural distinctions for the examination:
| Contrast | Von Neumann | Harvard |
|---|---|---|
| Memory | Shared program and data memory | Separate program and data memories |
| Bottleneck | Single bus limits throughput | Simultaneous instruction and data fetch |
| Typical use | General-purpose processors | DSPs, most microcontrollers, PLC processors |
Microprocessor vs. microcontroller: a microprocessor is a CPU requiring external memory and peripherals; a microcontroller integrates CPU, RAM, ROM/flash, timers and I/O on a single chip — the architecture inside a protective relay, a variable-frequency drive controller or a smart meter.
Interrupts suspend the running program, save the context, execute an interrupt service routine and return. Maskable interrupts can be disabled in software; non-maskable interrupts (used for power-fail detection in substation IEDs) cannot. Polling, by contrast, wastes processor time continuously checking a flag.
Solved Board Exam Examples
Example 1: Boolean Simplification
Simplify .
Solution. Combine the first two terms, which differ only in :
Applying the absorption identity :
The function is simply OR — three product terms collapse to one two-input gate.
Example 2: Address Bus Sizing
A microcontroller must address 256 KiB of memory. How many address lines are required?
Solution. bytes.
Sixteen lines would reach only 64 KiB, and 20 lines would reach 1 MiB — both are supplied as distractors.
Example 3: Decade Counter Flip-Flop Count
How many flip-flops are needed for a modulo-10 (BCD decade) counter?
Solution. The counter must represent ten distinct states, 0 through 9, so we need the smallest satisfying . Since and , the answer is , with the unused states 10–15 decoded to force a synchronous reset back to zero.
Which pair of logic gates is functionally complete, meaning any Boolean function can be realised using only that gate type?
NAND and NOR
AND and OR
XOR and XNOR
AND and NOT
In a Karnaugh map, grouping eight adjacent cells containing 1 in a four-variable map eliminates how many variables from the resulting product term?
One variable
Two variables
Three variables
Four variables
A microprocessor has a 20-bit address bus and an 8-bit data bus. What is the maximum directly addressable memory?
64 KiB
256 KiB
1 MiB
8 MiB
Sections you finish are checked off in the contents.