Fully solved problem book
RAM addressing
Set 4 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 0097
RAM[3] initially stores 224. Write 243 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 11100000 (224 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 11110011.
- The selected stored byte is replaced with 11110011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 11110011, which equals 243 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 243
State and memory · Problem 0098
RAM[10] initially stores 237. Write 24 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 11101101 (237 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 00011000.
- The selected stored byte is replaced with 00011000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 00011000, which equals 24 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 24
State and memory · Problem 0099
RAM[1] initially stores 250. Write 61 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 11111010 (250 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 00111101.
- The selected stored byte is replaced with 00111101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 00111101, which equals 61 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 61
State and memory · Problem 0100
RAM[8] initially stores 7. Write 98 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 00000111 (7 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 01100010.
- The selected stored byte is replaced with 01100010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 01100010, which equals 98 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 98
State and memory · Problem 0101
RAM[15] initially stores 20. Write 135 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 00010100 (20 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 10000111.
- The selected stored byte is replaced with 10000111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 10000111, which equals 135 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 135
State and memory · Problem 0102
RAM[6] initially stores 33. Write 172 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 00100001 (33 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 10101100.
- The selected stored byte is replaced with 10101100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 10101100, which equals 172 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 172
State and memory · Problem 0103
RAM[13] initially stores 46. Write 209 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 00101110 (46 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 11010001.
- The selected stored byte is replaced with 11010001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 11010001, which equals 209 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 209
State and memory · Problem 0104
RAM[4] initially stores 59. Write 246 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 00111011 (59 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 11110110.
- The selected stored byte is replaced with 11110110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 11110110, which equals 246 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 246
State and memory · Problem 0105
RAM[11] initially stores 72. Write 27 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 01001000 (72 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 00011011.
- The selected stored byte is replaced with 00011011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 00011011, which equals 27 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 27
State and memory · Problem 0106
RAM[2] initially stores 85. Write 64 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 01010101 (85 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 01000000.
- The selected stored byte is replaced with 01000000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 01000000, which equals 64 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 64
State and memory · Problem 0107
RAM[9] initially stores 98. Write 101 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 01100010 (98 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 01100101.
- The selected stored byte is replaced with 01100101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 01100101, which equals 101 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 101
State and memory · Problem 0108
RAM[0] initially stores 111. Write 138 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 01101111 (111 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 10001010.
- The selected stored byte is replaced with 10001010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 10001010, which equals 138 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 138
State and memory · Problem 0109
RAM[7] initially stores 124. Write 175 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 01111100 (124 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 10101111.
- The selected stored byte is replaced with 10101111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 10101111, which equals 175 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 175
State and memory · Problem 0110
RAM[14] initially stores 137. Write 212 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 10001001 (137 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 11010100.
- The selected stored byte is replaced with 11010100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 11010100, which equals 212 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 212
State and memory · Problem 0111
RAM[5] initially stores 150. Write 249 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 10010110 (150 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 11111001.
- The selected stored byte is replaced with 11111001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 11111001, which equals 249 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 249
State and memory · Problem 0112
RAM[12] initially stores 163. Write 30 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 10100011 (163 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 00011110.
- The selected stored byte is replaced with 00011110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 00011110, which equals 30 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 30
State and memory · Problem 0113
RAM[3] initially stores 176. Write 67 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 10110000 (176 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 01000011.
- The selected stored byte is replaced with 01000011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 01000011, which equals 67 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 67
State and memory · Problem 0114
RAM[10] initially stores 189. Write 104 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 10111101 (189 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 01101000.
- The selected stored byte is replaced with 01101000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 01101000, which equals 104 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 104
State and memory · Problem 0115
RAM[1] initially stores 202. Write 141 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 11001010 (202 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 10001101.
- The selected stored byte is replaced with 10001101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 10001101, which equals 141 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 141
State and memory · Problem 0116
RAM[8] initially stores 215. Write 178 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 11010111 (215 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 10110010.
- The selected stored byte is replaced with 10110010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 10110010, which equals 178 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 178
State and memory · Problem 0117
RAM[15] initially stores 228. Write 215 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 11100100 (228 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 11010111.
- The selected stored byte is replaced with 11010111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 11010111, which equals 215 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 215
State and memory · Problem 0118
RAM[6] initially stores 241. Write 252 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 11110001 (241 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 11111100.
- The selected stored byte is replaced with 11111100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 11111100, which equals 252 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 252
State and memory · Problem 0119
RAM[13] initially stores 254. Write 33 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 11111110 (254 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 00100001.
- The selected stored byte is replaced with 00100001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 00100001, which equals 33 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 33
State and memory · Problem 0120
RAM[4] initially stores 11. Write 70 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 00001011 (11 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 01000110.
- The selected stored byte is replaced with 01000110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 01000110, which equals 70 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 70
State and memory · Problem 0121
RAM[11] initially stores 24. Write 107 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 00011000 (24 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 01101011.
- The selected stored byte is replaced with 01101011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 01101011, which equals 107 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 107
State and memory · Problem 0122
RAM[2] initially stores 37. Write 144 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 00100101 (37 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 10010000.
- The selected stored byte is replaced with 10010000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 10010000, which equals 144 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 144
State and memory · Problem 0123
RAM[9] initially stores 50. Write 181 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 00110010 (50 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 10110101.
- The selected stored byte is replaced with 10110101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 10110101, which equals 181 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 181
State and memory · Problem 0124
RAM[0] initially stores 63. Write 218 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 00111111 (63 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 11011010.
- The selected stored byte is replaced with 11011010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 11011010, which equals 218 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 218
State and memory · Problem 0125
RAM[7] initially stores 76. Write 255 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 01001100 (76 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 11111111.
- The selected stored byte is replaced with 11111111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 11111111, which equals 255 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 255
State and memory · Problem 0126
RAM[14] initially stores 89. Write 36 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 01011001 (89 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 00100100.
- The selected stored byte is replaced with 00100100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 00100100, which equals 36 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 36
State and memory · Problem 0127
RAM[5] initially stores 102. Write 73 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 01100110 (102 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 01001001.
- The selected stored byte is replaced with 01001001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 01001001, which equals 73 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 73
State and memory · Problem 0128
RAM[12] initially stores 115. Write 110 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 01110011 (115 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 01101110.
- The selected stored byte is replaced with 01101110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 01101110, which equals 110 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 110