1. Gyanastra
  2. Computer Organisation and Architecture
  3. UGC NET: Microprogrammed Control
  4. Control Memory and Address Sequencing
Free lesson, no account needed 13 min read 27 practice questions after it
Asked in past papers1 time
  • UGC NET2017

Computer Organisation and Architecture · UGC NET: Microprogrammed Control

Control Memory and Address Sequencing

Overview

A microprogrammed control unit does not generate control signals from fixed hardware gates; it reads them from a control memory as a sequence of microinstructions. The unit therefore needs a mechanism that decides which microinstruction to fetch next — sequential step, jump, conditional branch, subroutine call/return, or the first microinstruction of a new machine instruction.
That mechanism is address sequencing. This lesson sits inside the official UGC topic Microprogrammed Control and is examined through bit-width calculations of the microinstruction format, mapping of opcodes to control addresses, and the roles of the control address register, incrementer, branch field, condition field and subroutine register.
You should already know what a register transfer microoperation is, what an opcode is, and how a ROM is addressed, before starting here.
The standard convention used throughout is M. Morris Mano's Computer System Architecture model, in which control memory is a ROM of MM words, each word being one microinstruction.

Key concepts

  • Microoperation: an elementary operation performed on data stored in registers (e.g., R1←R2R1 \leftarrow R2, AC←AC+1AC \leftarrow AC + 1, shift, complement). It is the smallest indivisible action.
  • Microinstruction: one control word stored in control memory; it specifies one or more microoperations together with next-address information.
  • Microprogram: the ordered set of microinstructions that implements one machine instruction. A microprogram routine is the same thing viewed as a subroutine of the control unit.
  • Control memory (control store): the memory inside the control unit that stores microinstructions.
    In the standard model it is a ROM; if it is writable it is called a WCS (Writable Control Store) and permits dynamic microprogramming.
  • Control word width: the number of bits in one microinstruction; it equals the sum of the widths of all its fields.
  • Control Address Register (CAR): holds the address of the microinstruction to be fetched from control memory. Its width is fixed by the number of words in control memory.
  • Sequencer / Next Address Generator: the combinational block that computes the next value of CAR.
  • Address sequencing: the process of selecting the next microinstruction address.
    The four standard sources are: the incrementer, the branch address field (AD) of the current microinstruction, the mapping logic driven by the machine-instruction opcode, and the subroutine return register / stack (SBR).
  • Branch field (BR): selects the type of next-address operation (continue, jump, call, return, map).
  • Condition field (CD): selects which status bit (zero, carry, sign, overflow, indirect bit, etc.) is tested; one code normally means "unconditional".
  • Address field (AD): supplies the target address used by a jump or call.
  • Mapping: the process by which the opcode of a machine instruction is transformed into the starting address of its microprogram in control memory.
  • Subroutine nesting: because microsubroutines may be nested, return addresses are kept in a LIFO stack; a single return register holds only one level.
  • Diagnosability: since each microinstruction is a small, well-defined operation, faults are easier to detect.
    Diagnostic tools examine the contents of flags, registers and counters, which together hold the internal state of the control unit.

How it works

1. Structure of the unit. The opcode part of the instruction register feeds the mapping logic. The sequencer chooses one of its inputs, loads CAR, control memory outputs the addressed microinstruction, and the AD/BR/CD fields of that microinstruction return to the sequencer to decide the following address.

2. The four address sources and when each is used.

  • Incrementer: routine case. Next address == CAR + 1+\,1; used when the condition is false or the microinstruction is the last in a straight-line block.
  • Branch address field (AD): taken jump or a conditional branch whose condition is true.
  • Mapping logic: only at the start of every machine instruction, to produce the first address of that instruction's microprogram from its opcode.
  • Subroutine register / stack: used on a return from a microsubroutine.

3. Branch field options. A 2-bit BR field gives exactly four choices in the Mano model:

BR valueOperationNext address in CAR
0Continue / jump on condition falseCAR + 1+\,1
1Jump or conditional branch (if CD condition true)AD
2Call microsubroutineSBR ←\leftarrow CAR + 1+\,1, then CAR ←\leftarrow AD
3Return from microsubroutine / mapCAR ←\leftarrow SBR, or CAR ←\leftarrow mapped opcode address

4.
Mapping procedure.
Take the kk-bit opcode field from the instruction register, insert aa zeros to its left and bb zeros to its right to fill the nn-bit CAR. The zeros on the right reserve a block of consecutive words for the microprogram of one opcode, so a branch inside the routine can stay inside the block.

5. Condition field. With 4 status bits to choose from, 2 bits suffice (22=42^2 = 4); if one code is reserved for "always", only 3 real conditions plus unconditional are available.

6. Subroutine handling. Each call saves CAR + 1+\,1 into SBR (or pushes it on a stack); the return pops it back. Nested calls at depth dd need dd saved addresses, hence a stack.

7. Execution order of a machine instruction. Fetch the machine instruction → map its opcode to a control address → execute the microinstructions sequentially with branches as decided → when the routine ends, fetch the next machine instruction and map again.

Figure. Notice that the sequencer selects among opcode-derived, incremented, AD-field, and subroutine addresses to load the CAR. The control memory then outputs the microinstruction, whose AD/BR/CD fields return to the sequencer.

Formulas

  • Field width for nn distinct choices: b=⌈log⁡2n⌉b = \lceil \log_2 n \rceil bits, where n≤2bn \le 2^{b}. Example: n=15n = 15 gives b=4b = 4, because 23=8<15≤162^3 = 8 < 15 \le 16.
  • Control address register width: r=⌈log⁡2M⌉r = \lceil \log_2 M \rceil, where MM is the number of words in control memory.
  • Total capacity of control memory: C=M×WC = M \times W bits, with WW the microinstruction width.
  • Microinstruction width: W=wF1+wF2+⋯+wCD+wBR+wADW = w_{F1} + w_{F2} + \dots + w_{CD} + w_{BR} + w_{AD} (sum over every field present).
  • Mapping address size: n=a+k+bn = a + k + b bits, where kk = opcode bits, aa = zeros inserted on the left, bb = zeros inserted on the right.
  • Number of blocks addressable after mapping: 2k2^{k} opcodes, each with 2b2^{b} words in its reserved block.
  • Branch reach with a tt-bit AD field: 2t2^{t} words per page when AD is shorter than rr.

Worked examples

Example 1 (direct bit calculation). A microinstruction has microoperation subfields F1 and F2, each with 15 distinct microoperations; a CD field selecting among 4 status bits; a BR field with 4 options; and an AD field for a 128-word control memory. Find the microinstruction size.

  • F1: n=15⇒⌈log⁡215⌉=4n = 15 \Rightarrow \lceil \log_2 15 \rceil = 4 bits.
  • F2: same, 4 bits.
  • CD: n=4⇒2n = 4 \Rightarrow 2 bits.
  • BR: n=4⇒2n = 4 \Rightarrow 2 bits.
  • AD: M=128⇒7M = 128 \Rightarrow 7 bits.
  • Total =4+4+2+2+7=19= 4 + 4 + 2 + 2 + 7 = 19 bits.

Example 2 (weighted-position, two steps). An address is specified as 3×512+7×64+5×8+33 \times 512 + 7 \times 64 + 5 \times 8 + 3. How many 1s are in its binary form?

  • Recognise 512=83512 = 8^3, 64=8264 = 8^2, 8=818 = 8^1, 1=801 = 8^0, so the value is (3753)8(3753)_8.
  • Each octal digit becomes 3 binary bits: 3→0113 \to 011, 7→1117 \to 111, 5→1015 \to 101, 3→0113 \to 011.
  • Binary: 011 111 101 011011\,111\,101\,011; ones =2+3+2+2=9= 2 + 3 + 2 + 2 = 9.

Example 3 (mapping). An 8-bit opcode is mapped by placing two zeros on the left and two zeros on the right. Find the control memory address space and the starting address for opcode 10110100210110100_2.

  • Address width =2+8+2=12= 2 + 8 + 2 = 12 bits, so the control memory has 212=40962^{12} = 4096 words.
  • Opcode 1011010010110100 gives 00 10110100 00=001011010000200\,10110100\,00 = 001011010000_2, i.e. address 720720 in decimal.
  • Each opcode owns 22=42^2 = 4 consecutive words.

Example 4 (format fitting). Control memory has 512 words of 32 bits; the format has a 16-bit microoperation field, a 2-bit CD field and an AD field that must reach every word. Find the widths.

  • AD needs ⌈log⁡2512⌉=9\lceil \log_2 512 \rceil = 9 bits.
  • Used =16+2+9=27= 16 + 2 + 9 = 27 bits; the word is 32 bits, so 5 bits are unused.
  • Capacity =512×32=16384= 512 \times 32 = 16384 bits.

Example 5 (two-step, hard). A control memory has 2048 words; the format is 12-bit microoperation, 3-bit condition, and a branch address field. If the AD field is only 8 bits, what is the microinstruction width and how far can one branch reach?

  • Full address width =⌈log⁡22048⌉=11= \lceil \log_2 2048 \rceil = 11 bits.
  • With an 8-bit AD field, total width =12+3+8=23= 12 + 3 + 8 = 23 bits.
  • A branch can reach 28=2562^8 = 256 words directly; the high 3 address bits must come from elsewhere (a page register), so control memory is effectively split into 23=82^3 = 8 pages of 256 words.

Example 6 (statement type).
Statement I: With a single subroutine return register, microsubroutines can be nested to any depth.
Statement II: On a microsubroutine call, the value saved is the incremented CAR.

  • I is false: one register stores one address, so a second call overwrites the first return address; nesting needs a stack.
  • II is true: the return point is the microinstruction after the call, i.e. CAR + 1+\,1.
    Answer: I false, II true.

Comparison

FeatureControl memoryMain memory / cache
LocationInside the control unitOutside the CPU (main) or on-chip (cache)
ContentsMicroinstructions (control words)Machine instructions and data
Normal operationRead-only (ROM); WCS if writableRead and write
Addressed byCARPC / MAR
Visible to programmerNo (except WCS microprogramming)Yes
FeatureCARPC
HoldsAddress of next microinstructionAddress of next machine instruction
Updated bySequencer (increment, AD, mapping, SBR)Incrementer, branch logic
Width fixed bySize of control memorySize of main memory
Source of next addressTrigger
IncrementerSequential step, or condition false
AD fieldUnconditional jump, or conditional branch taken
Mapping logicStart of each machine instruction
Subroutine register / stackReturn from microsubroutine
Look-alike pairDifference
Mapping vs branchMapping derives the first address from the opcode; branching takes an address from the AD field
Microoperation vs microinstructionMicrooperation is one elementary action; microinstruction is the control word holding one or more of them
Microprogram vs microinstructionMicroprogram is the whole routine for one machine instruction

Revision summary

  • Control memory stores microinstructions, not machine instructions.
  • The set of microinstructions implementing one machine instruction is a microprogram.
  • CAR width =⌈log⁡2M⌉= \lceil \log_2 M \rceil; 512 words →\to 9 bits, 1024 →\to 10, 2048 →\to 11.
  • nn choices need ⌈log⁡2n⌉\lceil \log_2 n \rceil bits; 15 microoperations need 4 bits, not 3.
  • Capacity =M×W= M \times W bits; 512 words of 24 bits =12288= 12288 bits.
  • Address sequencing has four sources: incrementer, AD field, mapping logic, subroutine register.
  • Nested microsubroutines need a stack; one register is not enough.
  • Mapping inserts zeros on both sides of the opcode; total width =a+k+b= a + k + b.
  • CD selects which condition; BR selects what type of branch.
  • Flags, registers and counters are the observables used in fault diagnosis.
  • The incrementer supplies CAR + 1+\,1 only when no branch is taken.

Previous-year exam insights

  • Bit-count of the microinstruction format is the most frequent numeric question: convert "distinct microoperations / conditions / branch options / address space" into bits and add them.
    The trap is using log⁡2n\log_2 n without rounding up when nn is not a power of two.
  • Mapping arithmetic appears as "zeros on the left and right of the opcode": check whether the question asks for the address width, the number of words, or the actual address value.
  • Octal/binary weight questions disguised as arithmetic: recognise powers of 8, convert each octal digit to three bits, then count ones.
  • Statement I/II questions test whether the incrementer always gives the next address (it does not), and whether one return register supports nesting (it does not).
  • Match List-I with List-II questions pair microoperation, microinstruction, microprogram, control memory, incrementer, mapping logic, subroutine register and condition field with their descriptions — learn one-line definitions.
  • Assertion–Reason questions on placing mapping logic between the instruction register and CAR, and on reloading CAR through mapping at the start of every machine instruction.
  • Ordering questions on the sequence: fetch machine instruction, map opcode, execute microinstructions, test condition, branch or increment, return.
  • Watch for options that confuse control memory with cache or RAM, and CAR with PC; both are standard distractors.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  1. Compute the microinstruction width from a list of field descriptions, including non-power-of-two counts.
  2. Derive the CAR width and total capacity from the number and size of control memory words.
  3. Perform opcode-to-control-address mapping with zeros on either side and state both the address width and the address value.
  4. List the four sources of the next microinstruction address and the condition under which each is selected.
  5. Explain why nested microsubroutines require a stack and what fails with a single return register.
  6. Distinguish microoperation, microinstruction and microprogram in one line each.
  7. Identify which fields control the branch type and which control the tested condition.
  8. Decide the truth of statement pairs about the incrementer, mapping reload and subroutine return.
  9. Solve a match-the-list set on incrementer, mapping logic, subroutine register and condition field.
  10. Convert a polynomial in powers of 8 into binary and count ones correctly.

Attempt the sub-topic test on Control Memory and Address Sequencing first, then take the full Microprogrammed Control subject test.

Pages 1–2 of 2