S4 Computer architecture · Practice
Instruction set design
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 10 kinds solid
Check
How many bits do three register fields take with 32 registers?
Check
A 32-bit instruction has two register fields for 16 registers and a 10-bit opcode. How many bits are left for the immediate?
Check
A branch offset is a 13-bit signed number counted in units of 1 bytes. How far backward can a branch reach?
Check
A fraction 0.5 of a program's 32-bit instructions are replaced by 16-bit forms. What percentage of the original size is the code?
Check
On a load-store ISA, a program runs at CPI 1.2, and a fraction 0.15 of its instructions are loads whose value is used only by the next instruction. A register-memory ISA fuses each such pair into one instruction with CPI 3, and its clock period is 1.1 times as long. What's the register-memory version's time as a fraction of the load-store version's?
Check
In a variable-length ISA, 0.5 of instructions are 2 bytes, 0.25 are 4 bytes and the rest 6 bytes. What's the average length?
Check
A 32-bit ISA has 32 registers and spends 10 bits on opcode fields. Its branches store 13-bit offsets counted in 4-byte units.
(a)
How many bits do three register fields take?
(b)
How wide an immediate fits beside two register fields?
(c)
How far can a branch reach?
Check
Immediate bits: 32-bit instruction, 32 registers, 8-bit opcode?
Check
Backward reach of a 10-bit offset in 2-byte units?
Check
Code size with 0.5 compressed?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in S4