Building bit-sliced ALUs and 2's-complement condition flags (Z, N, C, V), tracing micro-operation control signals across single-bus and multi-bus datapaths, and designing hardwired versus horizontal/vertical microprogrammed control memories.
1. Bit-Sliced ALU Design and Signed 2's-Complement Flags (C, V, N, Z)
An -bit Arithmetic Logic Unit (ALU) combines parallel logic gates (AND, OR, XOR, NOT) with a binary ripple/CLA adder controlled by input modifiers ( muxing ) and , allowing a single adder to execute ADD, SUB (), INC (), DEC (), and comparisons without duplicating adders.
After an -bit operation producing result , four status flags update the Program Status Word (PSW):
Zero (): (1 iff result is all zeros).
Negative / Sign (): (MSB).
Unsigned Carry (): (carry out of MSB; note in subtraction implemented via , means with no borrow!).
Signed Overflow (): (occurs exclusively when two same-sign inputs produce an opposite-sign MSB: !).
Modular 1-bit ALU slice combining input inversion MUX, Full Adder, bitwise logic, and signed/unsigned status flag generation.
2. Single-Bus vs Multi-Bus CPU Datapaths and Register Transfer Timing
The Datapath interconnects General-Purpose Registers (R0–Rk), PC, IR, MAR/MDR, and the ALU via tri-state/MUX buses. Bus count directly dictates cycles per instruction:
Single-Bus Datapath: Only one value can travel on the bus per clock cycle! Therefore a two-operand ALU instruction (ADD R1, R2, R3 ) needs temp latches Y and Z and 3 execute cycles:
R1_out, Y_in (latch operand 1 in Y),
R2_out, SelectY, Add, Z_in (drive operand 2 on bus, compute ALU, capture in Z),
Z_out, R3_in (write result back).
Three-Bus Datapath (Bus A, Bus B feeding ALU inputs; Bus C feeding register writeback): eliminates Y and Z completely, completing R3 <- R1 + R2 in 1 execute clock cycle!
3. Hardwired vs Microprogrammed Control Units
Feature
Hardwired Control Unit
Microprogrammed Control Unit
Implementation
Combinational gates / PLA driven by IR, step counter T, & Flags
Control Store ROM holding microinstructions indexed by μPC
Execution speed
Fastest (combinational delay only)
Slower (Control ROM access overhead per micro-cycle)
Modification / Bug Fix
Requires silicon hardware redesign
Easy firmware/microcode update
Best architecture fit
Simple regular RISC ISAs & pipelined cores
Complex variable-length CISC instructions
Hardwired PLAs compute control signals directly in combinational logic, whereas Microprogrammed units fetch pre-stored control words from ROM.
4. Horizontal vs Vertical Microprogramming & Control Memory Sizing
Every microinstruction word in Control Memory contains (1) Control Signal Fields, (2) Condition/Branch Select, and (3) Next-Address (μPC) Field:
Horizontal Microprogramming: devotes dedicated bit per control signal ( control signals bits!). Zero external decoders, fast, maximum parallelism (can activate any independent signals simultaneously!).
Vertical Microprogramming: encodes mutually exclusive signals into -bit fields routed through -to- external decoders! Produces much narrower ROM width, at the cost of extra decoder delay and lost parallelism across signals sharing a field!
Total Control Store Capacity:
Formulas to remember
Signed 2's-complement overflow flag VHere for ADD and for SUB ().
ALU arithmetic function modes via B-modifier
Horizontal vs vertical encoded field widthRemember the idle ('none active') state inside a mutually exclusive vertical decoder group!
Zero & negative status flag Boolean expressions
Microprogrammed control store bit capacity
Common mistakes
Equating carry-out with signed overflow: Adding sets even though the signed result is completely valid (!).
Forgetting the idle ('no-op') state in vertical micro-encoding: mutually exclusive control signals require bits, NOT , whenever all signals can be off simultaneously (catching power-of-2 boundary traps like !).
Thinking single-bus ALUs run in 1 clock cycle: Feeding two operands and writing back across one shared bus consumes separate cycles via Y and Z latches.
Confusing borrow vs carry-out in subtraction: When subtracting via 2's complement addition, indicates NO borrow ( unsigned), whereas indicates !
Assuming microprogrammed control cannot handle conditional branches: Selecting next μPC via status flags inside the condition-select MUX enables looping and conditional jumps cleanly inside microcode.
Worked examples
Try each step yourself, then reveal the working.
Example 1: Evaluating Condition Flags C, V, N, Z on 8-Bit 2's-Complement Operations
numerical
An -bit ALU computes via , with ( signed) and (). Compute the 8-bit result , carry , and signed overflow flag .
Step 1: Compute A + B_bar + 1 bit by bit
Try it on paper first.
Example 2: Comparing Horizontal vs Vertical Microinstruction Word Widths
numerical
A processor has control signals partitioned into mutually exclusive functional groups of sizes and (each group also needs a 'none active' state), plus words of Control Memory and branch conditions ( unconditional + flags). Compute the microinstruction width (in bits) under (a) Horizontal vs (b) Vertical control.
Step 1: Compute Horizontal word width
Try it on paper first.
Example 3: Tracing Fetch + Execute Cycles on a Single-Bus Datapath
conceptual
Count the minimum clock cycles required to execute SUB R1, R2 (, already fetched into IR) on (a) a single-bus datapath using latches Y, Z and (b) a 3-bus datapath.
Step 1: Trace single-bus micro-steps
Try it on paper first.
Example 4: Single Control Store Size Calculation with Horizontal Encoding
numerical
A microprogrammed CPU supports machine instructions, each requiring at most sequential microinstructions, using unencoded horizontal control signals, condition-code MUX inputs, and explicit next-address branching. Compute the exact Control Memory capacity in bytes.
Step 1: Determine number of Control Memory words and field widths
Try it on paper first.
Previous year questions
No official GATE EC question is tagged with this topic yet. The topic test below uses practice questions.
Topic test
8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.
Mark as mastered
Loading your progress…
My revision notes
Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-29. Spotted a mistake? Use Report an issue on any question, or contact us.