Instruction Format, Addressing Capacity, Bus-Width Impact, and Register Bit-Widths (32-bit Hypothetical Microprocessor)
Instruction Format, Addressing Capacity, Bus-Width Impact, and Register Bit-Widths (32-bit Hypothetical Microprocessor)
We consider a hypothetical 32-bit microprocessor whose instruction word is 32 bits and has two fields: the first byte (8 bits) holds the opcode, while the remaining 24 bits holds either an immediate operand or an operand address. From this instruction format, the address-related field width is directly bits, which constrains what can be encoded as a direct memory address. This directly ties into the general principle that the width of the address bus determines the maximum addressable memory locations (typically in bytes).2
Key ideas:
- Opcode
- Immediate operand
- Direct addressing
- Address bus
- Instruction register (IR)
Footnotes
-
Addressable Memory - an overview - Provides examples connecting address bus bits to addressable bytes/locations. ↩
-
Bus (computing) - Describes address bus role and how width impacts addressable memory locations. ↩
(a) Maximum directly addressable memory capacity (bytes)
Since:
- Instruction size = 32 bits
- Opcode field = first byte = 8 bits
- Remaining field = address/immediate field = bits
For direct addressing, the CPU can encode distinct byte addresses. Therefore, the maximum directly addressable memory is:
This follows the general addressing relationship: if the address contains bits and memory is byte-addressed, then the number of addressable bytes is .2
Footnotes
-
Addressable Memory - an overview - Provides examples connecting address bus bits to addressable bytes/locations. ↩
-
Bus (computing) - Describes address bus role and how width impacts addressable memory locations. ↩
(b) Impact on system speed for different bus widths
Bus width affects the amount of data moved per transfer and thus the system’s throughput. In general, wider data buses move more bits per memory access, while wider address buses increase the number of accessible locations (addressing capacity) but do not automatically increase per-transfer payload.2
We’ll analyze two hypothetical cases. Let:
- Local address bus width = bits
- Local data bus width = bits
Assume a typical RAM operation transfers bits per memory access. If the CPU needs a 32-bit word but the data bus is narrower, the word will require multiple transfers (and thus more bus cycles). The number of transfers needed for one 32-bit word is approximately:
This is consistent with the intuition that a narrower data bus reduces how much data can be moved per transaction, slowing execution.
(i) 32-bit local address bus and 16-bit local data bus
- Addressing capacity: locations (if byte-addressed) is addressed-capable, but the instruction’s direct address field (24 bits) still limits direct encoding (part a). The system can still potentially use addressing modes/banking beyond direct field limits, but that’s outside the given instruction format constraint.
- Data movement: -bit data bus means each transfer moves 16 bits bytes.
So a 32-bit operand fetch/store generally takes:
Impact on speed: compared to an ideal 32-bit-wide data bus, memory accesses that require 32-bit quantities will take roughly about 2× the bus transactions, reducing throughput and slowing instruction execution, especially for instruction fetch and load/store operations.2
(ii) 16-bit local address bus and 16-bit local data bus
- Addressing capacity is now limited by the 16-bit local address bus: This directly constrains the maximum directly usable memory space by the local bus.
- Data movement is the same as case (i): 16-bit data bus again:
Impact on speed: two effects occur:
- Like (i): narrower data bus causes ~2 transfers per 32-bit word (slower throughput).
- Additional severe limitation: reduced addressable memory space can force address remapping/banking or prevent programs from fitting; that can increase software complexity and/or cause extra overhead for accessing the needed data/instructions.
Overall, case (ii) is expected to be at least as slow as (i) for transfers and potentially much slower in practice due to reduced accessible memory (and any added management overhead).
Footnotes
-
Bus (computing) - Describes address bus role and how width impacts addressable memory locations. ↩ ↩2 ↩3 ↩4
-
What is bus width, and how does it affect microprocessor performance? - HackMD - Discusses data bus width impact on throughput/memory access. ↩ ↩2 ↩3 ↩4
-
System Bus or System Bottleneck? - Notes practical bandwidth differences by bus width and relates width to transfer speed. ↩
IR load
Instruction fetchCPU fetches 32-bit instruction into the Instruction Register (IR)."
Load/store (data transfers)
Operand accessIf data bus is narrower than 32 bits, multiple transfers may be required per word."
Address bus role
Address selectionAddress bus width determines how much memory the system can select in hardware."
Completion
ExecutionInstruction completes after required bus transactions finish."
Visual intuition (Mermaid)
Pro Tip
"When a problem asks about bus-width impact on speed, first compare data-bus payload per transfer. Address-bus width mainly affects addressable capacity, not how many bytes arrive per transaction."2
Footnotes
-
Bus (computing) - Describes address bus role and how width impacts addressable memory locations. ↩
-
What is bus width, and how does it affect microprocessor performance? - HackMD - Discusses data bus width impact on throughput/memory access. ↩
Common Pitfall
"Don’t assume a wide local address bus automatically speeds execution. Speed is dominated by how many transfers are needed per word, which is driven by the data bus width (and by memory latency/cache effects not covered here)."2
Footnotes
-
What is bus width, and how does it affect microprocessor performance? - HackMD - Discusses data bus width impact on throughput/memory access. ↩
-
System Bus or System Bottleneck? - Notes practical bandwidth differences by bus width and relates width to transfer speed. ↩
(c) Bits needed for program counter (PC) and instruction register (IR)
Instruction register (IR)
The IR must hold the entire fetched instruction word. Since instructions are 32-bit, the IR width is:
This is consistent with the general rule that the instruction register stores the current instruction in full machine-instruction length.
Program counter (PC)
The PC must generate enough address bits to select the next instruction location. In many textbook treatments, the number of PC bits equals the number of bits needed to address all instruction memory locations, which is tied to the address bus width (or instruction-memory address space).
Given the instruction format uses 24 bits for an operand address field, a common interpretation for direct instruction-memory addressing is that instruction addresses also use the same effective address width as “direct addressing.” Under that assumption:
However, if instead the question intends PC to match the local address bus, then PC bits would be in case (i). The problem statement in part (c) does not explicitly refer to the bus configuration from (b), so the cleanest inference consistent with the “operand address field” mechanism is to use bits for direct instruction addressing.
Thus:
- Program counter (PC)
- PC bits:
- IR bits:
(If your course uses PC = address bus width, substitute the relevant bus width accordingly.)
Footnotes
-
Build an 8-bit computer | Ben Eater - Shows IR as a register holding the current instruction. ↩
Instruction Format: opcode + operand fields
Transfers per 32-bit word vs. data bus width (conceptual)
Assuming one transfer moves D bits, the number of transfers is ceil(32/D).
FAQ / Edge Cases
Key Concepts Flashcards
Knowledge Check
In the given 32-bit instruction format, the first byte is opcode. How many bits remain for an operand address field?