Fully solved problem book
RAM addressing
Set 1 of 6 · 32 worked questions. Predict your result before expanding the solution.
These worked traces are meant to build fluency through controlled variation. If several answers feel identical, try the next difficult value and look for the point where a carry, sign, branch, or selected memory address changes the outcome.
State and memory · Problem 0001
RAM[3] initially stores 0. Write 19 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[3] contains 00000000 (0 unsigned).
- The CPU puts the four-bit address 0011 on the address lines.
- The decoder selects row 3, not row 8.
- Write-enable becomes active and the incoming data lines carry 00010011.
- The selected stored byte is replaced with 00010011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 00010011, which equals 19 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 19
State and memory · Problem 0002
RAM[10] initially stores 13. Write 56 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[10] contains 00001101 (13 unsigned).
- The CPU puts the four-bit address 1010 on the address lines.
- The decoder selects row 10, not row 15.
- Write-enable becomes active and the incoming data lines carry 00111000.
- The selected stored byte is replaced with 00111000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 00111000, which equals 56 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 56
State and memory · Problem 0003
RAM[1] initially stores 26. Write 93 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[1] contains 00011010 (26 unsigned).
- The CPU puts the four-bit address 0001 on the address lines.
- The decoder selects row 1, not row 6.
- Write-enable becomes active and the incoming data lines carry 01011101.
- The selected stored byte is replaced with 01011101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 01011101, which equals 93 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 93
State and memory · Problem 0004
RAM[8] initially stores 39. Write 130 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[8] contains 00100111 (39 unsigned).
- The CPU puts the four-bit address 1000 on the address lines.
- The decoder selects row 8, not row 13.
- Write-enable becomes active and the incoming data lines carry 10000010.
- The selected stored byte is replaced with 10000010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 10000010, which equals 130 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 130
State and memory · Problem 0005
RAM[15] initially stores 52. Write 167 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[15] contains 00110100 (52 unsigned).
- The CPU puts the four-bit address 1111 on the address lines.
- The decoder selects row 15, not row 4.
- Write-enable becomes active and the incoming data lines carry 10100111.
- The selected stored byte is replaced with 10100111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 10100111, which equals 167 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 167
State and memory · Problem 0006
RAM[6] initially stores 65. Write 204 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[6] contains 01000001 (65 unsigned).
- The CPU puts the four-bit address 0110 on the address lines.
- The decoder selects row 6, not row 11.
- Write-enable becomes active and the incoming data lines carry 11001100.
- The selected stored byte is replaced with 11001100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 11001100, which equals 204 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 204
State and memory · Problem 0007
RAM[13] initially stores 78. Write 241 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[13] contains 01001110 (78 unsigned).
- The CPU puts the four-bit address 1101 on the address lines.
- The decoder selects row 13, not row 2.
- Write-enable becomes active and the incoming data lines carry 11110001.
- The selected stored byte is replaced with 11110001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 11110001, which equals 241 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 241
State and memory · Problem 0008
RAM[4] initially stores 91. Write 22 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[4] contains 01011011 (91 unsigned).
- The CPU puts the four-bit address 0100 on the address lines.
- The decoder selects row 4, not row 9.
- Write-enable becomes active and the incoming data lines carry 00010110.
- The selected stored byte is replaced with 00010110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 00010110, which equals 22 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 22
State and memory · Problem 0009
RAM[11] initially stores 104. Write 59 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[11] contains 01101000 (104 unsigned).
- The CPU puts the four-bit address 1011 on the address lines.
- The decoder selects row 11, not row 0.
- Write-enable becomes active and the incoming data lines carry 00111011.
- The selected stored byte is replaced with 00111011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 00111011, which equals 59 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 59
State and memory · Problem 0010
RAM[2] initially stores 117. Write 96 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[2] contains 01110101 (117 unsigned).
- The CPU puts the four-bit address 0010 on the address lines.
- The decoder selects row 2, not row 7.
- Write-enable becomes active and the incoming data lines carry 01100000.
- The selected stored byte is replaced with 01100000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 01100000, which equals 96 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 96
State and memory · Problem 0011
RAM[9] initially stores 130. Write 133 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[9] contains 10000010 (130 unsigned).
- The CPU puts the four-bit address 1001 on the address lines.
- The decoder selects row 9, not row 14.
- Write-enable becomes active and the incoming data lines carry 10000101.
- The selected stored byte is replaced with 10000101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 10000101, which equals 133 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 133
State and memory · Problem 0012
RAM[0] initially stores 143. Write 170 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[0] contains 10001111 (143 unsigned).
- The CPU puts the four-bit address 0000 on the address lines.
- The decoder selects row 0, not row 5.
- Write-enable becomes active and the incoming data lines carry 10101010.
- The selected stored byte is replaced with 10101010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 10101010, which equals 170 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 170
State and memory · Problem 0013
RAM[7] initially stores 156. Write 207 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[7] contains 10011100 (156 unsigned).
- The CPU puts the four-bit address 0111 on the address lines.
- The decoder selects row 7, not row 12.
- Write-enable becomes active and the incoming data lines carry 11001111.
- The selected stored byte is replaced with 11001111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 11001111, which equals 207 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 207
State and memory · Problem 0014
RAM[14] initially stores 169. Write 244 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[14] contains 10101001 (169 unsigned).
- The CPU puts the four-bit address 1110 on the address lines.
- The decoder selects row 14, not row 3.
- Write-enable becomes active and the incoming data lines carry 11110100.
- The selected stored byte is replaced with 11110100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 11110100, which equals 244 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 244
State and memory · Problem 0015
RAM[5] initially stores 182. Write 25 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[5] contains 10110110 (182 unsigned).
- The CPU puts the four-bit address 0101 on the address lines.
- The decoder selects row 5, not row 10.
- Write-enable becomes active and the incoming data lines carry 00011001.
- The selected stored byte is replaced with 00011001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 00011001, which equals 25 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 25
State and memory · Problem 0016
RAM[12] initially stores 195. Write 62 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[12] contains 11000011 (195 unsigned).
- The CPU puts the four-bit address 1100 on the address lines.
- The decoder selects row 12, not row 1.
- Write-enable becomes active and the incoming data lines carry 00111110.
- The selected stored byte is replaced with 00111110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 00111110, which equals 62 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 62
State and memory · Problem 0017
RAM[3] initially stores 208. Write 99 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[3] contains 11010000 (208 unsigned).
- The CPU puts the four-bit address 0011 on the address lines.
- The decoder selects row 3, not row 8.
- Write-enable becomes active and the incoming data lines carry 01100011.
- The selected stored byte is replaced with 01100011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 01100011, which equals 99 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 99
State and memory · Problem 0018
RAM[10] initially stores 221. Write 136 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[10] contains 11011101 (221 unsigned).
- The CPU puts the four-bit address 1010 on the address lines.
- The decoder selects row 10, not row 15.
- Write-enable becomes active and the incoming data lines carry 10001000.
- The selected stored byte is replaced with 10001000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 10001000, which equals 136 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 136
State and memory · Problem 0019
RAM[1] initially stores 234. Write 173 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[1] contains 11101010 (234 unsigned).
- The CPU puts the four-bit address 0001 on the address lines.
- The decoder selects row 1, not row 6.
- Write-enable becomes active and the incoming data lines carry 10101101.
- The selected stored byte is replaced with 10101101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 10101101, which equals 173 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 173
State and memory · Problem 0020
RAM[8] initially stores 247. Write 210 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[8] contains 11110111 (247 unsigned).
- The CPU puts the four-bit address 1000 on the address lines.
- The decoder selects row 8, not row 13.
- Write-enable becomes active and the incoming data lines carry 11010010.
- The selected stored byte is replaced with 11010010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 11010010, which equals 210 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 210
State and memory · Problem 0021
RAM[15] initially stores 4. Write 247 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[15] contains 00000100 (4 unsigned).
- The CPU puts the four-bit address 1111 on the address lines.
- The decoder selects row 15, not row 4.
- Write-enable becomes active and the incoming data lines carry 11110111.
- The selected stored byte is replaced with 11110111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 11110111, which equals 247 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 247
State and memory · Problem 0022
RAM[6] initially stores 17. Write 28 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[6] contains 00010001 (17 unsigned).
- The CPU puts the four-bit address 0110 on the address lines.
- The decoder selects row 6, not row 11.
- Write-enable becomes active and the incoming data lines carry 00011100.
- The selected stored byte is replaced with 00011100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 00011100, which equals 28 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 28
State and memory · Problem 0023
RAM[13] initially stores 30. Write 65 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[13] contains 00011110 (30 unsigned).
- The CPU puts the four-bit address 1101 on the address lines.
- The decoder selects row 13, not row 2.
- Write-enable becomes active and the incoming data lines carry 01000001.
- The selected stored byte is replaced with 01000001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 01000001, which equals 65 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 65
State and memory · Problem 0024
RAM[4] initially stores 43. Write 102 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[4] contains 00101011 (43 unsigned).
- The CPU puts the four-bit address 0100 on the address lines.
- The decoder selects row 4, not row 9.
- Write-enable becomes active and the incoming data lines carry 01100110.
- The selected stored byte is replaced with 01100110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 01100110, which equals 102 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 102
State and memory · Problem 0025
RAM[11] initially stores 56. Write 139 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[11] contains 00111000 (56 unsigned).
- The CPU puts the four-bit address 1011 on the address lines.
- The decoder selects row 11, not row 0.
- Write-enable becomes active and the incoming data lines carry 10001011.
- The selected stored byte is replaced with 10001011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 10001011, which equals 139 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 139
State and memory · Problem 0026
RAM[2] initially stores 69. Write 176 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[2] contains 01000101 (69 unsigned).
- The CPU puts the four-bit address 0010 on the address lines.
- The decoder selects row 2, not row 7.
- Write-enable becomes active and the incoming data lines carry 10110000.
- The selected stored byte is replaced with 10110000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 10110000, which equals 176 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 176
State and memory · Problem 0027
RAM[9] initially stores 82. Write 213 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[9] contains 01010010 (82 unsigned).
- The CPU puts the four-bit address 1001 on the address lines.
- The decoder selects row 9, not row 14.
- Write-enable becomes active and the incoming data lines carry 11010101.
- The selected stored byte is replaced with 11010101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 11010101, which equals 213 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 213
State and memory · Problem 0028
RAM[0] initially stores 95. Write 250 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[0] contains 01011111 (95 unsigned).
- The CPU puts the four-bit address 0000 on the address lines.
- The decoder selects row 0, not row 5.
- Write-enable becomes active and the incoming data lines carry 11111010.
- The selected stored byte is replaced with 11111010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 11111010, which equals 250 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 250
State and memory · Problem 0029
RAM[7] initially stores 108. Write 31 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[7] contains 01101100 (108 unsigned).
- The CPU puts the four-bit address 0111 on the address lines.
- The decoder selects row 7, not row 12.
- Write-enable becomes active and the incoming data lines carry 00011111.
- The selected stored byte is replaced with 00011111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 00011111, which equals 31 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 31
State and memory · Problem 0030
RAM[14] initially stores 121. Write 68 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[14] contains 01111001 (121 unsigned).
- The CPU puts the four-bit address 1110 on the address lines.
- The decoder selects row 14, not row 3.
- Write-enable becomes active and the incoming data lines carry 01000100.
- The selected stored byte is replaced with 01000100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 01000100, which equals 68 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 68
State and memory · Problem 0031
RAM[5] initially stores 134. Write 105 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[5] contains 10000110 (134 unsigned).
- The CPU puts the four-bit address 0101 on the address lines.
- The decoder selects row 5, not row 10.
- Write-enable becomes active and the incoming data lines carry 01101001.
- The selected stored byte is replaced with 01101001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 01101001, which equals 105 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 105
State and memory · Problem 0032
RAM[12] initially stores 147. Write 142 there, then read the same location. What returns?
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- The machine models 16 byte-wide addresses: 0–15.
- Each location stores an eight-bit data word.
- At the start, RAM[12] contains 10010011 (147 unsigned).
- The CPU puts the four-bit address 1100 on the address lines.
- The decoder selects row 12, not row 1.
- Write-enable becomes active and the incoming data lines carry 10001110.
- The selected stored byte is replaced with 10001110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 10001110, which equals 142 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 142