C8 Computer organization · Practice
Memory, addresses and the memory map
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 11 kinds solid
Check
An array of 32-bit words starts at 0x1578. At what address does element 5 start (counting from 0)?
Check
The word 0xFAAB4621 is stored at address 0x1000. Which byte is at address 0x1000?
Check
The byte at an address is 0xAD. What value does lb (load byte, signed) put in a register?
Check
Swap the two words in data memory, so that a holds what b held and b holds what a held.
RISC-V RV32IM (base integer plus multiply and divide). End your program with ebreak. Tab indents; press Esc and then Tab to move on.
Check
A processor has 20-bit addresses. How much memory can it address, in KiB (1 KiB = 1024 bytes)?
Check
An array of 8-byte elements starts at address 4096.
(a)
Where is element 3?
(b)
What offset does a load from the base register use?
Check
sh stores the halfword BEEF at address 0x1002.
(a)
Which byte is at 0x1002?
(b)
And at 0x1003?
Check
Word array at 0x20B0. Address of element 7?
Check
0xFAAB4621 at 0x2000, little-endian. Byte at 0x2000?
Check
lb reads the byte 0xAD. Result?
Check
Store 718 into word 2 (counting from 0) of the array that starts at 0x1000.
RISC-V RV32IM (base integer plus multiply and divide). End your program with ebreak. Tab indents; press Esc and then Tab to move on.
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 C8