Design of control unit: hardwired and microprogrammed
How the control unit generates control signals: micro-operations of the instruction cycle, hardwired control, microprogrammed control, horizontal and vertical microinstructions, and the control-word and control-memory size calculations GATE asks.
The control unit (CU) issues control signals (register load enables, ALU function selects, memory read and write, bus gates) in the right order. Each clock step performs one or more micro-operations, register transfers such as .
The instruction cycle is fetch, decode, operand fetch, execute, write back (and an interrupt check). A typical fetch on a machine with a memory address register (MAR) and memory data register (MDR):
Step
Micro-operations
,
Micro-operations can share a step only if they do not conflict: they must not need the same bus or register in the same cycle, and one must not need a value the other is still producing. fits in because the PC has already been copied into MAR.
The CU's inputs are the opcode in IR, the step (timing) signal, status flags and external signals such as interrupts. Its outputs are the control signals. There are two ways to build it: hardwired and microprogrammed.
2. Hardwired control
A hardwired control unit generates control signals with fixed combinational logic.
A step (sequence) counter counts clock cycles within an instruction. A -bit counter feeding a -to- decoder gives timing signals .
An opcode decoder turns the opcode into one line per instruction.
Each control signal is a sum-of-products of timing lines, opcode lines and flags, for example or .
At the end of an instruction the counter is cleared.
Strengths: fastest possible signal generation; small for a simple instruction set.
Weaknesses: the logic must be redesigned to change or add instructions; it becomes complex for large, irregular instruction sets.
RISC processors, with few simple fixed-format instructions, are usually hardwired.
3. Microprogrammed control
A microprogrammed control unit stores control words in a control memory (usually ROM). Each word is a microinstruction; the microinstructions for one machine instruction form its microroutine. All microroutines together are the microprogram (firmware).
Parts:
Control address register (CAR), also called the micro-PC: address of the next microinstruction.
Mapping logic: turns the opcode into the start address of its microroutine.
Sequencer: chooses the next CAR value: CAR + 1, a branch address from the microinstruction (if the selected condition holds), the mapped opcode address, or a return address.
A microinstruction typically has three fields:
Next address needs bits for a control memory of words.
Condition select picks one of branch conditions (often including “always”), needing bits.
Control memory size bits.
Changing an instruction means changing ROM contents, not logic, so microprogramming suits large CISC instruction sets. It is slower because every step needs a control memory read.
Microprogrammed control unit: the sequencer loads CAR, control memory outputs signals and the next address
4. Horizontal and vertical microinstructions
Horizontal microinstructions use one bit per control signal. Any combination of signals can be active together, so parallelism is maximum and no decoding is needed, but words are wide.
Vertical microinstructions encode groups of signals. Signals that are never active together (mutually exclusive, for example the ALU's add, subtract and AND) form a group. A group of signals is encoded in a field of
when the field also needs a “no signal” code, or bits when one of the is always active. Read the question to see which applies. Each field drives a decoder, so words are narrow but there is a decoding delay and less parallelism.
Horizontal
Vertical
Control field
1 bit per signal
encoded fields
Word width
large
small
Parallel signals
any combination
one per group
Decoding hardware
none
decoder per field
Speed
faster
slower
Hardwired vs microprogrammed
Hardwired
Microprogrammed
Speed
faster
slower (control memory read)
Changing instructions
redesign logic
rewrite microcode
Suits
RISC, simple ISA
CISC, large ISA
Design cost for complex ISA
high
lower
Formulas to remember
Next-address field = number of words in control memory
Horizontal microinstruction width control signals, selectable conditions
Vertical field for a group of n signalsUse if the field never needs a no-signal code
Control memory size
Timing signals from a k-bit step counter
Common mistakes
Forgetting the “always” or “none” code when sizing a condition or encoded field.
Using for an encoded group when the question needs a no-signal code, or the reverse; read which applies.
Leaving out the next-address field when computing the microinstruction width.
Saying microprogrammed control is faster; every step costs a control memory read.
Placing two micro-operations in one step when one depends on the other's result.
Worked examples
Try each step yourself, then reveal the working.
Example 1: Width of a horizontal microinstruction
numerical
A microprogrammed CPU has 40 control signals, a control memory of 1024 words, and can branch on any one of 7 status flags or unconditionally. Microinstructions are horizontal, with fields for control signals, condition select and next address. Find the microinstruction width and the control memory size in bits.
Step 1: Size the control field.
Try it on paper first.
Example 2: Saving bits with vertical encoding
numerical
31 control signals fall into four mutually exclusive groups of sizes 4, 9, 15 and 3. In each group at most one signal is active, and it may be that none is. How many bits does the control field need with vertical encoding, compared with horizontal?
Step 1: How many codes does a group of n signals need?
Try it on paper first.
Example 3: Size of the control memory address
numerical
A CPU has 64 machine instructions. Each has its own microroutine of 6 microinstructions, and all share a fetch microroutine of 4 microinstructions. How many bits does the next-address field need?
Step 1: Count the microinstructions.
Try it on paper first.
Example 4: Which micro-operations can share a step?
conceptual
In the fetch sequence, why can run in the same step as the memory read , but cannot?
Step 1: What does the memory read depend on?
Try it on paper first.
Previous year questions
2 official GATE CSE questions on this topic, newest first.
10 questions: up to 2 official PYQs and 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 CSE syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.