By the end of this chapter you'll be able to…

  • 1Separate the datapath's resources from the control unit's schedule
  • 2Define a micro-operation as a set of control signals in one cycle
  • 3Apply the resource-conflict rule to count cycles
  • 4State the role of each datapath register
  • 5Explain why memory address and buffer registers exist
  • 6Size the memory address and buffer registers from the memory organisation
  • 7Read and write register transfer notation
  • 8Compare single-, two- and three-bus datapaths by cycle count
  • 9Describe an ALU as a set of bit slices sharing select lines
  • 10Explain how one adder serves addition, subtraction, increment and decrement
  • 11State the meaning of the Z, N, C and V flags
  • 12Explain why a comparison is a discarded subtraction
  • 13Write the fetch micro-operation sequence and explain the shared cycle
  • 14Explain why operand fetch depends on the addressing mode
  • 15Describe hardwired control and state its advantages and limits
  • 16Describe the components of a microprogrammed control unit
  • 17Explain the role of mapping logic
  • 18Compare horizontal and vertical microinstruction formats
  • 19Compute microinstruction width for both formats
  • 20Explain nanoprogramming as a two-level scheme
  • 21Compare next-address and incremented-counter sequencing
  • 22Explain why interrupts are recognised at instruction boundaries
💡
Why this chapter matters in GATE
A processor divides cleanly into two halves: the datapath holds the resources — registers, the ALU, buses and memory ports — and the control unit decides which of them are used in each clock cycle. That division is the key to the whole topic, because a micro-operation is not a mysterious primitive but simply the set of control signals asserted during one clock cycle, and executing an instruction means asserting a particular sequence of such sets. The second organising fact is that the number of cycles an instruction needs is decided by resource conflicts rather than by how complicated the instruction sounds: two transfers needing the same bus cannot happen together, while two using disjoint resources can share a cycle. That single rule answers most cycle-count questions and explains why adding a bus or a second memory port helps specific instructions. The third is that hardwired and microprogrammed control implement the same schedule by different means, one as combinational logic and the other as a control-memory lookup, with speed against flexibility as the entire trade.

Before you start — revise these

🔗
Machine Instructions & Addressing Modes
The instruction set defines what the control unit must schedule, and addressing modes determine how many operand-fetch cycles an instruction needs.
🔗
Sequential Circuits
Registers, timing counters and the clock-period constraint are the sequential machinery the datapath is built from.
🔗
Number Representation & Computer Arithmetic
The ALU's adder, complement subtraction and the distinction between carry and signed overflow are developed there.

ALU, Data-path & Control Unit

A processor divides cleanly into two halves. The datapath holds the resources — registers, the ALU, buses and memory ports — and the control unit decides which of them are used in each clock cycle.

That division is the key to the whole topic. A micro-operation is not a mysterious primitive; it is simply the set of control signals asserted during one clock cycle, and executing an instruction means asserting a particular sequence of such sets.

The second organising fact is that the number of cycles an instruction needs is decided by resource conflicts, not by how complicated the instruction sounds. Two transfers that need the same bus cannot happen together, so they occupy separate cycles. Two transfers using disjoint resources can share a cycle.

That single rule answers most questions about cycle counts, and it also explains why adding a bus or a second memory port reduces the cycle count of specific instructions.

The third is that hardwired and microprogrammed control implement the same schedule by different means: one as combinational logic, the other as a lookup in a control memory. Speed against flexibility is the entire trade.

1. The Datapath

The datapath contains the storage and the functional units.

ElementRole
Program counterHolds the address of the next instruction
Instruction registerHolds the instruction being executed
Memory address registerDrives the address lines to memory
Memory buffer registerHolds data going to or coming from memory
General registersHold operands and results
ALUPerforms arithmetic and logic
Temporary registersHold intermediate values inside one instruction

The memory address and buffer registers exist because memory is slow and external. They isolate the processor's internal timing from the memory's, so the datapath can proceed while a memory access completes.

A register transfer is written in the notation , meaning the contents of are copied into at the end of the current clock cycle. Several transfers written on the same line are simultaneous and must use disjoint resources.

The widths of the memory address and buffer registers are fixed by the memory, not by the processor's word size, and questions exploit that distinction.

The memory address register must be wide enough to name every location, so its width is the base-two logarithm of the number of addressable locations. A memory of 64 K locations needs a 16-bit address register whatever the data width.

The memory buffer register must be as wide as one addressable unit. On a byte-addressable machine with a 32-bit data bus, four bytes move per access, so the buffer register is 32 bits while the addressing granularity remains one byte.

That mismatch is why the low-order address bits are used to select a byte within a fetched word rather than being sent to the memory array at all.

2. Bus Structures

The number of internal buses limits how many transfers can happen at once, and it is the dominant factor in cycle counts.

On a single-bus datapath, only one value can move per cycle. Adding two registers therefore takes three cycles: move the first operand to a temporary input of the ALU, move the second onto the bus while the ALU computes, and move the result back.

A two-bus datapath lets two values move simultaneously, so both ALU inputs can be supplied in one cycle and the result written in the next, giving two cycles.

A three-bus datapath supplies both operands and writes the result in a single cycle, because two source buses and one destination bus operate concurrently.

The cost is wiring and multiplexer complexity, which grows quickly. This is exactly the resource-conflict rule made concrete: more buses means fewer conflicts means fewer cycles per operation, at higher area cost.

3. The ALU

The arithmetic logic unit performs the operations an instruction names, selected by function-select control lines.

An -bit ALU is built as identical bit slices sharing the select lines, with the carry chaining between slices. This regularity is why ALU width is easy to change and why carry propagation dominates its delay.

Arithmetic operations reuse a single adder. Subtraction is addition of the complement, and the same adder computes increment and decrement by forcing the carry-in and one operand.

Logic operations are performed in parallel with the arithmetic, and a multiplexer at the output selects which result to present, controlled by the operation-select lines.

Status flags summarise the result for later branch instructions.

FlagMeaning
ZResult is zero
NResult is negative, that is the sign bit is 1
CCarry out of the most significant bit
VSigned overflow

The carry and overflow flags are distinct and answer different questions, exactly as in the arithmetic chapter: carry detects unsigned overflow while V detects signed overflow.

A conditional branch tests these flags rather than recomputing anything, which is why comparison instructions are usually just subtractions whose result is discarded.

4. The Instruction Cycle

Every instruction passes through the same outer phases, and only the execute phase differs between instruction types.

Fetch is identical for every instruction, which is what makes it worth hardwiring and later pipelining.

The fetch sequence on a single-bus machine is three cycles:

The program counter increment shares a cycle with the memory read, because the two use disjoint resources: the increment uses the ALU or a dedicated incrementer while the memory read uses the memory bus.

Decode extracts the opcode and operand specifiers. Operand fetch depends entirely on the addressing mode, which is why an indirect operand adds a cycle relative to a direct one.

Execute performs the operation, and writeback stores the result. Some machines add an interrupt-check phase at the end of every instruction, which is why interrupts are recognised between instructions rather than during one.

5. Hardwired Control

A hardwired control unit generates control signals with combinational logic driven by the opcode, a timing counter and status flags.

Each control signal becomes a Boolean function of the current state and the instruction. The signal that loads the instruction register, for example, is asserted whenever the timing counter reaches the third fetch cycle, regardless of opcode.

The advantages are speed and area: with no memory lookup in the path, the control signals appear after a single level of gate delay.

The disadvantage is rigidity. Changing or adding an instruction means redesigning and refabricating the logic, which is why hardwired control suits small, stable instruction sets — precisely the RISC case.

6. Microprogrammed Control

A microprogrammed control unit stores the control signals in a control memory. Each word of that memory is a microinstruction, and its bits are the control signals for one clock cycle.

The control unit fetches microinstructions in sequence, using a microprogram counter, and the microroutine for each machine instruction is a small program in this internal language.

ComponentRole
Control memoryStores microinstructions
Microprogram counterAddresses the next microinstruction
Control address registerHolds the current microinstruction address
SequencerDecides the next address, including branches
Mapping logicConverts an opcode into a microroutine start address

The mapping logic is what connects the two levels: an opcode arrives, and the mapper produces the address in control memory where that instruction's microroutine begins.

The advantage is flexibility. Adding an instruction means writing a new microroutine, not redesigning gates, and the same hardware can implement a different instruction set entirely.

The disadvantage is speed, since every cycle now includes a control memory read. This is why complex instruction sets were microprogrammed and why RISC designs, chasing a low cycle time, returned to hardwired control.

7. Microinstruction Formats

Microinstructions differ in how densely they encode the control signals.

A horizontal microinstruction devotes one bit to each control signal. It is wide, it allows any combination of signals to be asserted simultaneously, and it needs no decoding.

A vertical microinstruction encodes signals into fields. It is narrow and needs a decoder, and because a field can name only one signal at a time, mutually exclusive signals must be grouped into the same field.

PropertyHorizontalVertical
WidthWideNarrow
DecodingNoneRequired
ParallelismFullLimited
Control memory sizeLargeSmall
Microroutine lengthShorterLonger

The trade is width against length. A horizontal microprogram completes an instruction in fewer microinstructions because more can happen per cycle; a vertical one uses less memory per microinstruction but needs more of them.

Nanoprogramming inserts a second level: a short vertical microinstruction indexes a table of horizontal control words, capturing the density of vertical encoding while retaining full parallelism, at the cost of an extra memory access.

Sequencing within a microprogram needs its own addressing decisions, and two schemes appear.

In the next-address field scheme, every microinstruction carries the address of its successor explicitly. Microinstructions can then be placed anywhere in control memory, and branching costs nothing extra, but every word pays for the address field.

In the incremented-counter scheme, a microprogram counter advances by default and only branch microinstructions carry an address. Words are narrower, but microroutines must be laid out contiguously.

The choice mirrors the horizontal-versus-vertical trade exactly: pay width on every word, or pay length and layout constraints instead.

8. Worked Examples

Example 1. On a single-bus datapath, write the micro-operations for the instruction ADD R1, R2 meaning , and count the cycles.

Only one value can travel on the bus per cycle, so each transfer needs its own cycle unless it uses a different resource.

Cycle 1: , moving the first operand into the ALU's holding register.

Cycle 2: , placing on the bus as the ALU's second input and latching the sum in the output register .

Cycle 3: , returning the result.

The execute phase takes 3 cycles.

Adding the 3 fetch cycles gives 6 cycles for the whole instruction.

On a three-bus datapath the entire execute phase collapses to a single cycle, since both operands travel on two source buses and the result returns on the destination bus simultaneously. That is the resource-conflict rule made concrete.

Example 2. A machine has 32 control signals, a control memory of 1024 words, and uses horizontal microinstructions with a next-address field. What is the microinstruction width, and how large is the control memory in bits?

The control signal field needs one bit per signal in a horizontal format, so 32 bits.

The next-address field must be able to name any of the 1024 control memory locations, requiring bits.

The microinstruction width is bits.

The control memory holds 1024 words of 42 bits, which is bits, about 5.25 KB.

Note how the horizontal format's cost appears here. A vertical format grouping the 32 signals into, say, 5 fields of 3 bits each would need only 15 signal bits plus the 10 address bits, cutting the width to 25 bits and the memory to 25,600 bits — but at the cost of asserting at most 5 signals per cycle instead of all 32.

Example 3. Compare the number of cycles to execute LOAD R1, (R2) on a single-bus and a two-bus datapath, including fetch.

Fetch takes 3 cycles on a single-bus machine as derived earlier, and can take 2 on a two-bus machine, since the program counter increment and the address transfer no longer contend.

For the execute phase on the single-bus machine:

Cycle 1: , sending the pointer to memory. Cycle 2: , reading the operand. Cycle 3: , storing it.

That is 3 execute cycles, giving 6 in total.

On the two-bus machine, cycles 1 and 3 remain distinct because both need the single memory port in sequence, but the fetch saving carries through, giving 5 in total.

The instructive point is that a second bus does not help a memory-bound instruction as much as it helps a register-to-register one, because the bottleneck moved from the internal bus to the memory port. This is a general pattern: adding a resource helps only until a different resource becomes the constraint.

Example 4. Why is the program counter increment placed in the same cycle as the memory read during fetch?

Because the two operations use disjoint resources and therefore do not conflict.

The memory read occupies the memory address register, the memory bus and the memory buffer register. The increment occupies the program counter and either a dedicated incrementer or the ALU.

Nothing is shared, so both can be driven by the same set of control signals in one clock cycle, and the fetch phase costs 3 cycles rather than 4.

The consequence appears in branch instructions. By the time the instruction is decoded, the program counter already holds the address of the next instruction, which is why PC-relative displacements are measured from there and why a branch simply overwrites the program counter rather than computing from scratch.

Had the increment been deferred, the fetch would be one cycle longer on every single instruction, which is precisely the kind of cost that a per-instruction phase cannot afford.

Example 5. A microprogrammed control unit has 40 control signals, of which the signals divide into 4 mutually exclusive groups of sizes 10, 8, 12 and 10. Compare the horizontal and vertical microinstruction widths.

Horizontal format: one bit per signal, so 40 bits for the control field.

Vertical format: each group becomes a field wide enough to name any signal in it, plus one code for "no signal in this group".

Group of 10 needs to name 11 possibilities, requiring 4 bits. Group of 8 needs 9 possibilities, requiring 4 bits. Group of 12 needs 13 possibilities, requiring 4 bits. Group of 10 needs 11 possibilities, requiring 4 bits.

The vertical control field is bits, against 40 horizontal.

The saving is 60 per cent of the control field width, and it is available only because the signals within each group are genuinely mutually exclusive — no two can ever need asserting in the same cycle.

If any two signals in a group did need simultaneous assertion, the vertical encoding would make it impossible and the microprogram would need an extra cycle, which is exactly the width-against-length trade.

Example 6. Explain why interrupts are recognised between instructions rather than during one.

Because an instruction leaves the machine in a well-defined state only at its boundaries.

Partway through an instruction, temporary registers hold intermediate values, the memory buffer may hold a partially processed word, and the program counter may already have advanced past the instruction being executed. Saving and restoring all of that would require the interrupt mechanism to know the internal microstate of every instruction.

At an instruction boundary, by contrast, the entire visible state is the architectural registers and the program counter. Saving those is sufficient to resume exactly where execution left off, which is what makes interrupt handling tractable.

The cost is interrupt latency: a long instruction delays recognition until it completes. This is one reason instruction sets avoid unboundedly long instructions, and why those that have them — block move or string operations — are usually made interruptible by recording partial progress in architectural registers rather than internal ones.

Summary

The datapath holds resources and the control unit schedules them; a micro-operation is the set of control signals asserted in one clock cycle.

Cycle counts are decided by resource conflicts. Transfers sharing a bus or a memory port must occupy separate cycles; transfers using disjoint resources can share one.

A single-bus register addition takes three cycles, a two-bus version two, and a three-bus version one — at rising wiring cost.

An -bit ALU is identical bit slices sharing the select lines, with the carry chain dominating its delay. One adder serves addition, subtraction, increment and decrement.

The Z, N, C and V flags summarise a result, with C detecting unsigned overflow and V signed overflow, and conditional branches test them rather than recomputing.

Fetch is identical for every instruction and takes three cycles on a single-bus machine, with the program counter increment sharing the memory-read cycle because the resources are disjoint.

Hardwired control generates signals combinationally: fast, compact and rigid. Microprogrammed control reads them from a control memory: flexible and slower, with mapping logic converting an opcode into a microroutine address.

Horizontal microinstructions are wide, need no decoding and allow full parallelism; vertical ones are narrow, need a decoder and restrict mutually exclusive signals to one per field. The trade is microinstruction width against microprogram length.

Interrupts are recognised at instruction boundaries because only there is the visible state sufficient to resume from.

Key formulas & results

Everything to memorise for the exam hall, in one card. Screenshot this for revision.

The organising tool
THE DATAPATH HOLDS RESOURCES AND THE CONTROL UNIT SCHEDULES THEM. A MICRO-OPERATION IS THE SET OF CONTROL SIGNALS ASSERTED IN ONE CLOCK CYCLE.
EXECUTING AN INSTRUCTION MEANS ASSERTING A PARTICULAR SEQUENCE OF SUCH SETS, WHICH IS ALL A MICROPROGRAM IS.
The resource-conflict rule
TRANSFERS SHARING A BUS OR A MEMORY PORT MUST OCCUPY SEPARATE CYCLES. TRANSFERS USING DISJOINT RESOURCES CAN SHARE ONE.
CYCLE COUNTS ARE DECIDED BY THIS RULE, NOT BY HOW COMPLICATED AN INSTRUCTION SOUNDS. IT ALSO EXPLAINS WHY ADDING A BUS HELPS SPECIFIC INSTRUCTIONS.
Datapath registers
PROGRAM COUNTER HOLDS THE NEXT INSTRUCTION ADDRESS. INSTRUCTION REGISTER HOLDS THE CURRENT INSTRUCTION. MAR DRIVES THE ADDRESS LINES. MBR HOLDS DATA TO OR FROM MEMORY.
MAR AND MBR EXIST BECAUSE MEMORY IS SLOW AND EXTERNAL; THEY ISOLATE THE PROCESSOR'S INTERNAL TIMING FROM THE MEMORY'S.
Sizing MAR and MBR
MAR WIDTH IS THE BASE-TWO LOGARITHM OF THE NUMBER OF ADDRESSABLE LOCATIONS. MBR WIDTH IS THE WIDTH OF ONE MEMORY ACCESS.
A 64 K-LOCATION MEMORY NEEDS A 16-BIT MAR WHATEVER THE DATA WIDTH. LOW-ORDER ADDRESS BITS SELECT A BYTE WITHIN A FETCHED WORD RATHER THAN GOING TO THE ARRAY.
Register transfer notation
R1 GETS R2 MEANS THE CONTENTS OF R2 ARE COPIED INTO R1 AT THE END OF THE CURRENT CLOCK CYCLE.
SEVERAL TRANSFERS WRITTEN ON THE SAME LINE ARE SIMULTANEOUS AND MUST USE DISJOINT RESOURCES.
Bus count and cycles
SINGLE BUS: A REGISTER ADDITION TAKES THREE CYCLES. TWO BUSES: TWO CYCLES. THREE BUSES: ONE CYCLE.
THE COST IS WIRING AND MULTIPLEXER COMPLEXITY, WHICH GROWS QUICKLY. MORE BUSES MEANS FEWER CONFLICTS MEANS FEWER CYCLES, AT HIGHER AREA COST.
ALU structure
AN n-BIT ALU IS n IDENTICAL BIT SLICES SHARING THE FUNCTION-SELECT LINES, WITH THE CARRY CHAINING BETWEEN SLICES.
THIS REGULARITY IS WHY ALU WIDTH IS EASY TO CHANGE AND WHY CARRY PROPAGATION DOMINATES ITS DELAY.
One adder, four operations
SUBTRACTION IS ADDITION OF THE COMPLEMENT; INCREMENT AND DECREMENT COME FROM FORCING THE CARRY-IN AND ONE OPERAND.
LOGIC OPERATIONS RUN IN PARALLEL WITH THE ARITHMETIC AND AN OUTPUT MULTIPLEXER SELECTS WHICH RESULT TO PRESENT.
Status flags
Z MEANS THE RESULT IS ZERO. N MEANS THE SIGN BIT IS 1. C IS THE CARRY OUT OF THE MOST SIGNIFICANT BIT. V IS SIGNED OVERFLOW.
C DETECTS UNSIGNED OVERFLOW AND V DETECTS SIGNED OVERFLOW; THEY ANSWER DIFFERENT QUESTIONS AND CAN FIRE INDEPENDENTLY.
Comparisons and branches
A CONDITIONAL BRANCH TESTS THE FLAGS RATHER THAN RECOMPUTING ANYTHING, WHICH IS WHY A COMPARE INSTRUCTION IS USUALLY A SUBTRACTION WHOSE RESULT IS DISCARDED.
THE FLAGS ARE THE ONLY THING THE COMPARISON LEAVES BEHIND, AND THE BRANCH READS THEM IN A LATER CYCLE.
The fetch sequence
CYCLE 1: MAR GETS PC. CYCLE 2: MBR GETS M[MAR] AND PC GETS PC PLUS 1. CYCLE 3: IR GETS MBR.
THE PROGRAM COUNTER INCREMENT SHARES A CYCLE WITH THE MEMORY READ BECAUSE THE RESOURCES ARE DISJOINT: ONE USES THE INCREMENTER, THE OTHER THE MEMORY BUS.
Why fetch is uniform
FETCH IS IDENTICAL FOR EVERY INSTRUCTION, WHICH IS WHAT MAKES IT WORTH HARDWIRING AND LATER PIPELINING.
ONLY THE EXECUTE PHASE DIFFERS BETWEEN INSTRUCTION TYPES, AND OPERAND FETCH DEPENDS ENTIRELY ON THE ADDRESSING MODE.
Hardwired control
CONTROL SIGNALS ARE COMBINATIONAL FUNCTIONS OF THE OPCODE, A TIMING COUNTER AND THE STATUS FLAGS.
FAST AND COMPACT BECAUSE NO MEMORY LOOKUP SITS IN THE PATH, BUT RIGID: CHANGING AN INSTRUCTION MEANS REDESIGNING THE LOGIC. THIS SUITS SMALL STABLE INSTRUCTION SETS.
Microprogrammed control
CONTROL SIGNALS ARE STORED IN A CONTROL MEMORY. EACH WORD IS A MICROINSTRUCTION AND ITS BITS ARE THE CONTROL SIGNALS FOR ONE CLOCK CYCLE.
COMPONENTS ARE THE CONTROL MEMORY, MICROPROGRAM COUNTER, CONTROL ADDRESS REGISTER, SEQUENCER AND MAPPING LOGIC.
Mapping logic
MAPPING LOGIC CONVERTS AN OPCODE INTO THE ADDRESS IN CONTROL MEMORY WHERE THAT INSTRUCTION'S MICROROUTINE BEGINS.
IT IS WHAT CONNECTS THE MACHINE-INSTRUCTION LEVEL TO THE MICROINSTRUCTION LEVEL.
Horizontal versus vertical
HORIZONTAL DEVOTES ONE BIT PER CONTROL SIGNAL: WIDE, NO DECODING, FULL PARALLELISM. VERTICAL ENCODES SIGNALS INTO FIELDS: NARROW, NEEDS A DECODER, ONE SIGNAL PER FIELD.
THE TRADE IS WIDTH AGAINST LENGTH. HORIZONTAL COMPLETES AN INSTRUCTION IN FEWER MICROINSTRUCTIONS; VERTICAL USES LESS MEMORY PER MICROINSTRUCTION BUT NEEDS MORE OF THEM.
Vertical field sizing
A FIELD COVERING A GROUP OF k MUTUALLY EXCLUSIVE SIGNALS NEEDS ENOUGH BITS TO NAME k PLUS 1 POSSIBILITIES, THE EXTRA BEING NO SIGNAL IN THIS GROUP.
THE ENCODING IS ONLY VALID IF THE SIGNALS IN A GROUP GENUINELY NEVER NEED SIMULTANEOUS ASSERTION.
Nanoprogramming
A SHORT VERTICAL MICROINSTRUCTION INDEXES A TABLE OF HORIZONTAL CONTROL WORDS.
IT CAPTURES THE DENSITY OF VERTICAL ENCODING WHILE RETAINING FULL PARALLELISM, AT THE COST OF AN EXTRA MEMORY ACCESS PER CYCLE.
Microprogram sequencing
NEXT-ADDRESS FIELD: EVERY MICROINSTRUCTION CARRIES ITS SUCCESSOR'S ADDRESS, SO PLACEMENT IS FREE BUT EVERY WORD PAYS. INCREMENTED COUNTER: THE COUNTER ADVANCES BY DEFAULT AND ONLY BRANCHES CARRY AN ADDRESS.
THE CHOICE MIRRORS THE HORIZONTAL-VERSUS-VERTICAL TRADE: PAY WIDTH ON EVERY WORD, OR PAY LENGTH AND LAYOUT CONSTRAINTS INSTEAD.
Interrupt recognition
INTERRUPTS ARE RECOGNISED AT INSTRUCTION BOUNDARIES, BECAUSE ONLY THERE IS THE VISIBLE STATE SUFFICIENT TO RESUME FROM.
PARTWAY THROUGH AN INSTRUCTION, TEMPORARY REGISTERS HOLD INTERMEDIATE VALUES AND THE PROGRAM COUNTER MAY HAVE ALREADY ADVANCED. THE COST IS INTERRUPT LATENCY.
⚠️

Traps GATE sets — and how to dodge them

These are the exact option-traps and misreads that cost marks under negative marking.

WATCH OUT
Counting cycles from the apparent complexity of an instruction
Cycles are decided by resource conflicts. Two transfers using different resources share a cycle regardless of how elaborate the instruction sounds, and two using the same bus need separate cycles however trivial they look.
WATCH OUT
Assuming more buses always reduce the cycle count
Adding a resource helps only until a different resource becomes the constraint. A memory-bound instruction gains little from a second internal bus, because the memory port is still the bottleneck.
WATCH OUT
Sizing the memory address register from the word size
Its width comes from the number of addressable locations, not from the data width. A 64 K-location memory needs a 16-bit address register whether the data bus is 8, 16 or 32 bits wide.
WATCH OUT
Forgetting that the program counter increment shares the fetch read cycle
The increment uses the incrementer or ALU while the read uses the memory bus, so the resources are disjoint and both fit in one cycle. Assuming a separate cycle overstates fetch as four cycles instead of three.
WATCH OUT
Treating the carry and overflow flags as the same condition
Carry detects unsigned overflow and V detects signed overflow. Each can fire without the other, and which one indicates an error depends entirely on how the program interprets the bits.
WATCH OUT
Assuming microprogrammed control is inherently slower per instruction
It is slower per cycle, because every cycle includes a control memory read. Whether an instruction takes longer overall depends on how many microinstructions its routine needs, which a wide horizontal format reduces.
WATCH OUT
Computing horizontal microinstruction width without the next-address field
If the sequencing scheme carries an explicit successor address, that field must be added to the control field. Its width is the base-two logarithm of the control memory size.
WATCH OUT
Grouping signals into a vertical field without checking exclusivity
A field can name only one signal per cycle. If two signals in a group ever need simultaneous assertion, the encoding forces an extra microinstruction and the supposed saving is lost.
WATCH OUT
Sizing a vertical field for exactly k signals
The field must also encode the case where no signal in that group is asserted, so it needs enough bits for k plus 1 possibilities. Omitting the null code makes the encoding unusable.
WATCH OUT
Expecting interrupts to be recognised mid-instruction
Only at an instruction boundary is the visible state sufficient to resume from. Mid-instruction, temporary registers and a partially updated program counter would all have to be saved, which is why the boundary check exists.
WATCH OUT
Assuming a comparison instruction computes something the branch reuses
The comparison is a subtraction whose numeric result is discarded; the only thing it leaves behind is the flag settings, and the branch reads those in a later cycle.

Exam-pattern practice

PYQ-style questions with full solutions. Work through them as a readiness check — mark yourself honestly and get your gap report at the end.

Readiness check

Are you exam-ready for ALU, Data-path & Control Unit?

9 problems from this chapter. Try each one, reveal the worked solution, mark yourself honestly — get your gap report at the end.

9 questions~6 min

5-minute revision

The whole chapter, distilled. Read this the night before the exam.

  • The datapath holds resources; the control unit schedules them.
  • A micro-operation is one cycle's control signals.
  • Resource conflicts decide cycle counts.
  • Disjoint resources can share a cycle.
  • MAR and MBR isolate processor timing from memory timing.
  • MAR width comes from the location count.
  • MBR width comes from the access width.
  • Single bus: register addition takes three cycles.
  • Two buses: two cycles. Three buses: one cycle.
  • An n-bit ALU is n bit slices sharing select lines.
  • One adder serves add, subtract, increment and decrement.
  • Z, N, C and V summarise a result.
  • C is unsigned overflow; V is signed overflow.
  • A comparison is a subtraction whose result is discarded.
  • Fetch is identical for every instruction.
  • Fetch takes three cycles on a single-bus machine.
  • The PC increment shares the memory-read cycle.
  • Operand fetch depends on the addressing mode.
  • Hardwired control is combinational, fast and rigid.
  • Microprogrammed control reads a control memory.
  • Mapping logic turns an opcode into a microroutine address.
  • Horizontal microinstructions use one bit per signal.
  • Vertical microinstructions encode signals into fields.
  • A vertical field needs a null code as well.
  • Vertical grouping requires genuine mutual exclusivity.
  • The trade is microinstruction width against microprogram length.
  • Nanoprogramming adds a second lookup level.
  • A next-address field frees layout but widens every word.
  • An incremented counter narrows words but forces contiguity.
  • Interrupts are recognised at instruction boundaries.
  • The cost of that is interrupt latency on long instructions.

GATE question blueprint

How this topic is asked, tier by tier — so you can prep to the pattern.

Typical weightage: Computer Organization contributes roughly 7-9 of the 72 core-CS marks; datapath and control supply 1-2 of those

Question styleMarks eachTypical countWhat it tests
Datapath1~1Register roles and sizing the address and buffer registers
Cycle counting2~1Writing micro-operations and grouping them by resource conflict
Bus structures2~1Comparing single-, two- and three-bus cycle counts
Status flags1~1Which flags a given operation sets and the carry versus overflow distinction
Instruction cycle2~1The fetch sequence, the shared increment cycle and mode-dependent operand fetch
Control unit2~1Hardwired versus microprogrammed trade-offs and mapping logic
Microinstruction width2~1Horizontal and vertical field sizing including next-address and null codes
Microinstruction format2~1Width against length, nanoprogramming and sequencing schemes

Exam-hall strategy

Battle-tested tips from mentors and toppers for this topic under the sectional clock.

  1. List the transfers first, then group them by resource conflict to count cycles.
  2. Always include the fetch cycles unless the question excludes them.
  3. Size the address register from the location count, not the word size.
  4. For microinstruction width, add the next-address field if the scheme uses one.
  5. For vertical fields, remember the null code when sizing.
  6. Check that grouped signals are genuinely mutually exclusive before accepting a vertical encoding.
  7. Cycle counts and microinstruction widths are commonly set as NAT, which carries no negative marking, so never leave one blank.
  8. For 1-mark and 2-mark MCQs, negative marking is -1/3 and -2/3, so guess only after eliminating an option.
  9. GATE gives a single freely-navigable 180-minute window, so flag a long micro-operation trace and return to it.

Beyond the exam

Where this skill shows up in the job you're competing for — and in life.

Reading a processor's cycle-count table

Understanding that cycle counts come from resource conflicts is what makes a datasheet's per-instruction timing predictable rather than arbitrary.

Choosing a soft-core configuration

The bus-count trade-off is a real parameter when configuring an FPGA soft processor, balancing logic utilisation against cycles per operation.

Patching a processor after fabrication

Microcode updates are how certain CPU errata are fixed in the field, which is only possible because the control signals live in writable memory.

Writing an interrupt handler

Knowing that interrupts are taken at instruction boundaries is why a handler can assume a consistent register state and why long instructions raise latency.

Where else this topic is tested

Prepare once, score in every exam that asks it.

GATE ECModerate overlap — microprocessor datapath and control appear, with more emphasis on specific processor architectures
UGC NET Computer ScienceHigh overlap — hardwired versus microprogrammed control and microinstruction formats are examined as direct recall
ISRO / BARC / DRDO computer science papersVery high overlap — micro-operation sequences, bus-count cycle comparisons and microinstruction sizing are recurring MCQ topics

Questions aspirants ask

Pulled from the Q&A community and mentor sessions.

List the transfers the instruction requires, then group them into cycles according to resource conflicts. The resources that matter are the internal buses, the ALU, the memory port and each register's write port. Two transfers can share a cycle if and only if they use disjoint resources. Applying this to a register addition on a single-bus machine: moving the first operand to the ALU input uses the bus; supplying the second operand while the ALU computes uses the bus again; returning the result uses the bus a third time. Three bus uses means three cycles. On a three-bus machine, two source buses and one destination bus are all distinct resources, so one cycle suffices. Applying it to fetch: reading memory occupies the memory port and the buffer register, while incrementing the program counter occupies the incrementer, so those two share a cycle and fetch costs three rather than four. Two cautions. The instruction fetch is always part of the count unless the question says otherwise, so an instruction with a three-cycle execute phase costs six in total on a single-bus machine. And adding a resource helps only until a different one becomes the bottleneck, which is why a second internal bus barely helps an instruction that spends most of its cycles waiting on the memory port.

Because the increment is folded into the fetch phase, where it costs nothing. During the cycle that reads memory, the memory port and buffer register are busy but the incrementer is idle, so incrementing the program counter in that same cycle uses a resource nobody else wants. Deferring it would add a cycle to every single instruction, which is an unacceptable cost for a phase that runs universally. The consequence propagates upward into the instruction set. By the time an instruction is decoded, the program counter holds the address of the following instruction, so a PC-relative branch displacement is naturally measured from there rather than from the branch itself. That is why branch target calculations in exam questions must add the instruction length before applying the displacement, and why the two conventions differ by exactly one instruction length. It also explains why a branch is implemented as an overwrite of the program counter rather than a computation from the instruction's own address: the instruction's own address is no longer available in any register by the time it would be needed. Machines that want it available, typically for exception reporting, keep a separate saved-PC register precisely because the working program counter has moved on.

When the instruction set is large, irregular or likely to change, and when the clock period is not the binding constraint. The cost of microprogramming is a control memory read inside every clock cycle, which lengthens the cycle time and therefore slows every instruction uniformly. The benefit is that adding or correcting an instruction means writing a microroutine rather than redesigning combinational logic, and that the same datapath can support a different instruction set entirely. Two structural factors push toward it. A large instruction count means the hardwired control logic must distinguish many opcode cases. Highly variable cycle counts per instruction mean it must also distinguish many timing states within each case, and the logic complexity grows roughly with the product. Forty instructions averaging seven cycles gives a few hundred distinct state-opcode combinations, which is where microprogramming becomes easier to design, verify and modify. Hardwired control wins when the instruction set is small and regular, because then the logic is shallow and the clock period saving is real. This is exactly the RISC argument. Designers who wanted a short clock period simplified the instruction set until hardwired control was practical, rather than accepting the microcode read in every cycle. Modern high-performance x86 implementations split the difference by hardwiring common simple instructions and microcoding only the rare complex ones.

Whether the signals grouped into each field are genuinely mutually exclusive, meaning no two of them ever need to be asserted in the same clock cycle. A field can name exactly one signal at a time, so grouping two signals that must sometimes fire together makes that combination inexpressible. The microprogram must then split the operation across two microinstructions, and the extra length can easily erase the memory saved by narrowing the word. Identifying valid groups requires knowing the datapath, not just counting signals. Signals that drive different sources onto the same bus are naturally exclusive, since only one source can drive a bus at a time. Signals selecting an ALU operation are exclusive, since the ALU performs one operation per cycle. But a signal loading a register and a signal enabling a memory read are not exclusive at all, and grouping them would be an error. Field sizing has one more subtlety worth stating: a group of k signals needs enough bits to encode k plus 1 possibilities, because the field must also represent the case where no signal in that group is asserted this cycle. Omitting the null code makes the encoding unusable, since every cycle would be forced to assert something from every group. Finally, the decoder needed to expand the fields sits on the critical path and adds gate delay to every cycle, which is a cost separate from the microprogram length.

Because only at a boundary is the machine's visible state sufficient to describe where to resume. Partway through an instruction, information lives in places the architecture does not expose: temporary registers holding intermediate ALU results, the memory buffer register holding a word in transit, a partially updated program counter, and the internal timing state of the control unit. Resuming would require saving and restoring all of it, which means the interrupt mechanism would have to understand the microarchitecture of every instruction, and the saved state would change whenever the implementation changed. At a boundary, by contrast, the entire relevant state is the architectural registers, the program counter and the status flags. Saving those is enough, and the definition is stable across implementations, which is what makes interrupt handling and context switching tractable at all. The price is interrupt latency: a long-running instruction delays recognition until it finishes. This is one practical reason instruction sets avoid unboundedly long instructions. Those that do have them, such as block move or string operations, are usually made restartable by keeping their progress in architectural registers rather than internal ones, so the instruction can be interrupted, the registers saved as usual, and the instruction simply re-executed from where its visible counters left off.
Header Logo