Control Unit Design Formula Sheet: Hardwired and Microprogrammed Revision Notes

Revise hardwired and microprogrammed control with a compact sheet, two complete numerical checks, explicit assumptions and a 15-minute recall drill.

KnowledgeGate Team

Exam prep & CS education

Updated 26 Nov 20266 min read
Control Unit Design Formula Sheet: Hardwired and Microprogrammed Revision Notes

Pair each formula with its use and a numerical check: formula -> use -> numerical check. The worked values are a six-state hardwired ADD sequence, a 128-word control store reduced from 544 bytes to 400 bytes, and a 100-instruction check that takes 415 microcycles.

Control unit design terms and revision map

Term

Exact revision meaning

When to use

Control unit

Issues datapath signals

Trace states

Datapath

Registers, buses and ALU

Track transfers

Micro-operation

Elementary hardware action

Describe a state

Control signal

Enables an action

Derive logic

Control word

Simultaneous control bits

Size a format

Microinstruction

Stored word plus sequencing data

Analyse one step

Microprogram

Microinstructions for one machine instruction

Count cycles

Control memory

Stores microinstructions

Find capacity

CAR

Current control address

Trace sequencing

CDR

Fetched microinstruction

Explain delivery

One instruction can require several microinstructions. Its path is fetch -> decode -> operand or effective-address work -> execute -> write-back or completion; exact states follow the datapath and memory timing.

Hardwired control derives signals from instruction bits, timing and flags. Microprogrammed control reads control-memory fields. See Control Unit Design in COA: Hardwired vs Microprogrammed for concept-first teaching; the calculations below collect equations, width arithmetic and timed revision checks. For an earlier concept-first worked treatment, see Hardwired and Microprogrammed Control Units: Explained Concepts and Worked, then use the calculations below for formula-led revision.

Hardwired control formulas and six-state ADD trace

For S states, binary encoding needs ceil(log2 S) flip-flops; one-hot needs S. Thus six states need ceil(log2 6) = 3 binary flip-flops, giving eight codes with two unused, or six one-hot flip-flops. First identify the encoding.

C_j is the OR of every product term requiring that signal. Here + is Boolean OR, juxtaposition is Boolean AND, and flags join the relevant term.

For a single-bus accumulator machine with single-cycle memory and no wait states:

State

Micro-operations

Active signals

T0

MAR <- PC

PCout, MARin

T1

MDR <- M[MAR], PC <- PC + 1

READ, MDRin, PCinc

T2

IR <- MDR

MDRout, IRin

T3, D_ADD = 1

MAR <- IR[address]

IRaddressOut, MARin

T4, D_ADD = 1

MDR <- M[MAR]

READ, MDRin

T5, D_ADD = 1

AC <- AC + MDR

MDRout, ALUadd, ACin

Mark required states, then OR their terms:

PCout = T0; MARin = T0 + D_ADD T3; READ = T1 + D_ADD T4; MDRin = T1 + D_ADD T4; PCinc = T1; MDRout = T2 + D_ADD T5; IRin = T2; IRaddressOut = D_ADD T3; ALUadd = D_ADD T5; ACin = D_ADD T5.

Six-state hardwired ADD control sequence from T0 through T5 with datapath transfers and key control equations for D_ADD.

Microinstruction width and control-memory size

Quantity

Formula

Address, N words

ceil(log2 N) bits

Sequencer, r choices

ceil(log2 r) bits

Width

control + next-address + sequencing or condition bits

Capacity

N x W bits

Bytes

N x W / 8 when integral

For N = 128, next-address width is ceil(log2 128) = 7 bits. Four sequencer choices need ceil(log2 4) = 2. With 25 direct signals, W_H = 25 + 7 + 2 = 34 bits and capacity is 128 x 34 = 4352 bits = 544 bytes.

Vertical encoding uses independent, mutually exclusive fields, reserving no-op in each:

Field

Choices

Width

Source bus

8

ceil(log2(8 + 1)) = 4

Destination register

5

ceil(log2(5 + 1)) = 3

ALU function

4

ceil(log2(4 + 1)) = 3

Shifter

3

ceil(log2(3 + 1)) = 2

Memory action

2

ceil(log2(2 + 1)) = 2

Flag action

3

ceil(log2(3 + 1)) = 2

Control fields total 4 + 3 + 3 + 2 + 2 + 2 = 16 bits. Thus W_V = 16 + 7 + 2 = 25 bits and 128 x 25 = 3200 bits = 400 bytes. Saving is 4352 - 3200 = 1152 bits = 144 bytes, or 1152 / 4352 x 100 = 26.47%, about 26.5%.

Signals in one encoded field cannot be asserted together. The Computer Architecture and Organisation course places these control-unit formulas alongside the surrounding datapath and memory topics.

Horizontal and vertical 128-word microinstruction layouts compare field widths, capacities, and the 1152-bit, 26.5 percent storage saving.

Microprogram sequencing and execution-time formulas

A microsequencer may increment CAR, load an address, branch on a flag, or dispatch from an opcode map. CAR_next = CAR + 1 is only for sequential flow; a taken branch loads its target.

Without pipelines or memory stalls, total microcycles = sum_i n_i L_i, where n_i is a class count and L_i includes fetch. Then time = microcycles x period and average microcycles = total microcycles / machine instructions.

For 40 ADDs at 5 microinstructions, 35 LOADs at 4 and 25 BRANCHes at 3:

40 x 5 + 35 x 4 + 25 x 3 = 200 + 140 + 75 = 415 microcycles.

At 20 ns each, 415 x 20 ns = 8300 ns = 8.3 microseconds. The average is 415 / 100 = 4.15 microcycles, or 4.15 x 20 ns = 83 ns per instruction. Add waits or variable paths only when supplied.

Hardwired, horizontal and vertical control compared

Property

Hardwired

Horizontal microprogrammed

Vertical microprogrammed

Signal generation

Logic

Direct bits

Encoded fields

Typical speed

Faster

Slower

Decoding adds delay

Ease of change

Hard

Easier

Easier

Control-word width

None

Wide

Compact

Parallel micro-operations

Datapath-limited

More

Field-restricted

Extra decoding

State and opcode

Less

More

Microprogrammed does not imply CISC, RISC does not imply hardwired, and formats can be partly encoded. Use Hardwired vs Microprogrammed Control Unit for GATE for exam traps and worked microinstruction numericals; the calculations here keep formulas and unit checks together for revision.

Use Boolean equations and state encoding for logic-derived outputs. Use width, address and capacity formulas for a supplied control store.

Control unit design traps and corrections

Shortcut

Failure

Correction

floor(log2 N)

Leaves words unreachable

Use ceil(log2 N)

ceil(log2 k) for k actions

Leaves no no-op

Use ceil(log2(k + 1)) when required

One ceiling after adding choices

Mis-sizes independent fields

Encode each field, then add

4352 bits means 4352 bytes

Makes capacity eight times too large

Divide by 8: 544 bytes

All signals are exclusive

Blocks required parallel actions

Encode only exclusive groups

Microinstructions equal instructions

Gives wrong timing

Label both counts

Six states need six flip-flops

Assumes one-hot

Binary needs ceil(log2 6) = 3

Omit decoded opcode

Fires for other instructions

Use D_ADD T3 for ADD only

Boolean + is arithmetic

Changes the function

Read + as OR

In particular, two simultaneously required signals placed in one encoded field make the word incapable of expressing that micro-operation.

Control unit design questions and 15-minute drill

Question shapes include deriving signals from opcode, timing and flags; finding state bits; sizing address or sequencer fields; computing capacity; comparing formats; tracing CAR; and calculating microcycles or time.

  1. 3 minutes: rewrite the five main formulas.

  2. 4 minutes: reconstruct six ADD states and the MARin, READ and MDRout equations.

  3. 4 minutes: recompute 544 bytes, 400 bytes and 26.5%.

  4. 4 minutes: reproduce 415 microcycles, 8.3 microseconds and 4.15 average microcycles.

Record the broken rule, such as a missed ceiling, a missing no-op, or a unit conversion error. The KnowledgeGate question bank gives more practice in this topic. KnowledgeGate Learn hub places this topic beside broader exam revision.

Control unit design revision: the short version

Given

Recall

S states

ceil(log2 S) binary state bits

N words

ceil(log2 N) address bits

k exclusive actions plus no-op

ceil(log2(k + 1)) field bits

N words of width W

N x W bits

Microcycles and period

time = microcycles x period

Active combinations

OR their state, opcode and condition products

Reproduce 3 state bits; horizontal 34 bits and 544 bytes; vertical 25 bits and 400 bytes; 144 bytes or 26.5% saved; and 415 microcycles or 8.3 microseconds. A structured GATE sequence can place this topic beside the rest of the syllabus. Choose the formula from the hardware description, state its assumptions, and keep units attached through the final line.

Go deeper with the full courseComputer Organization and Architecture

Keep learning

Discussion