Fully solved problem book
RAM addressing
Set 5 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 0129
RAM[3] initially stores 128. Write 147 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 10000000 (128 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 10010011.
- The selected stored byte is replaced with 10010011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 10010011, which equals 147 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 147
State and memory · Problem 0130
RAM[10] initially stores 141. Write 184 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 10001101 (141 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 10111000.
- The selected stored byte is replaced with 10111000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 10111000, which equals 184 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 184
State and memory · Problem 0131
RAM[1] initially stores 154. Write 221 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 10011010 (154 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 11011101.
- The selected stored byte is replaced with 11011101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 11011101, which equals 221 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 221
State and memory · Problem 0132
RAM[8] initially stores 167. Write 2 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 10100111 (167 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 00000010.
- The selected stored byte is replaced with 00000010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 00000010, which equals 2 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 2
State and memory · Problem 0133
RAM[15] initially stores 180. Write 39 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 10110100 (180 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 00100111.
- The selected stored byte is replaced with 00100111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 00100111, which equals 39 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 39
State and memory · Problem 0134
RAM[6] initially stores 193. Write 76 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 11000001 (193 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 01001100.
- The selected stored byte is replaced with 01001100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 01001100, which equals 76 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 76
State and memory · Problem 0135
RAM[13] initially stores 206. Write 113 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 11001110 (206 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 01110001.
- The selected stored byte is replaced with 01110001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 01110001, which equals 113 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 113
State and memory · Problem 0136
RAM[4] initially stores 219. Write 150 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 11011011 (219 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 10010110.
- The selected stored byte is replaced with 10010110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 10010110, which equals 150 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 150
State and memory · Problem 0137
RAM[11] initially stores 232. Write 187 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 11101000 (232 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 10111011.
- The selected stored byte is replaced with 10111011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 10111011, which equals 187 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 187
State and memory · Problem 0138
RAM[2] initially stores 245. Write 224 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 11110101 (245 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 11100000.
- The selected stored byte is replaced with 11100000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 11100000, which equals 224 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 224
State and memory · Problem 0139
RAM[9] initially stores 2. Write 5 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 00000010 (2 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 00000101.
- The selected stored byte is replaced with 00000101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 00000101, which equals 5 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 5
State and memory · Problem 0140
RAM[0] initially stores 15. Write 42 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 00001111 (15 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 00101010.
- The selected stored byte is replaced with 00101010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 00101010, which equals 42 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 42
State and memory · Problem 0141
RAM[7] initially stores 28. Write 79 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 00011100 (28 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 01001111.
- The selected stored byte is replaced with 01001111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 01001111, which equals 79 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 79
State and memory · Problem 0142
RAM[14] initially stores 41. Write 116 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 00101001 (41 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 01110100.
- The selected stored byte is replaced with 01110100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 01110100, which equals 116 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 116
State and memory · Problem 0143
RAM[5] initially stores 54. Write 153 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 00110110 (54 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 10011001.
- The selected stored byte is replaced with 10011001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 10011001, which equals 153 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 153
State and memory · Problem 0144
RAM[12] initially stores 67. Write 190 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 01000011 (67 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 10111110.
- The selected stored byte is replaced with 10111110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 10111110, which equals 190 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 190
State and memory · Problem 0145
RAM[3] initially stores 80. Write 227 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 01010000 (80 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 11100011.
- The selected stored byte is replaced with 11100011.
- The write does not inherently change RAM[8].
- A later read of row 3 selects the new contents.
- The output data is 11100011, which equals 227 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 227
State and memory · Problem 0146
RAM[10] initially stores 93. Write 8 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 01011101 (93 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 00001000.
- The selected stored byte is replaced with 00001000.
- The write does not inherently change RAM[15].
- A later read of row 10 selects the new contents.
- The output data is 00001000, which equals 8 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 8
State and memory · Problem 0147
RAM[1] initially stores 106. Write 45 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 01101010 (106 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 00101101.
- The selected stored byte is replaced with 00101101.
- The write does not inherently change RAM[6].
- A later read of row 1 selects the new contents.
- The output data is 00101101, which equals 45 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 45
State and memory · Problem 0148
RAM[8] initially stores 119. Write 82 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 01110111 (119 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 01010010.
- The selected stored byte is replaced with 01010010.
- The write does not inherently change RAM[13].
- A later read of row 8 selects the new contents.
- The output data is 01010010, which equals 82 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 82
State and memory · Problem 0149
RAM[15] initially stores 132. Write 119 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 10000100 (132 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 01110111.
- The selected stored byte is replaced with 01110111.
- The write does not inherently change RAM[4].
- A later read of row 15 selects the new contents.
- The output data is 01110111, which equals 119 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 119
State and memory · Problem 0150
RAM[6] initially stores 145. Write 156 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 10010001 (145 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 10011100.
- The selected stored byte is replaced with 10011100.
- The write does not inherently change RAM[11].
- A later read of row 6 selects the new contents.
- The output data is 10011100, which equals 156 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 156
State and memory · Problem 0151
RAM[13] initially stores 158. Write 193 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 10011110 (158 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 11000001.
- The selected stored byte is replaced with 11000001.
- The write does not inherently change RAM[2].
- A later read of row 13 selects the new contents.
- The output data is 11000001, which equals 193 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 193
State and memory · Problem 0152
RAM[4] initially stores 171. Write 230 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 10101011 (171 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 11100110.
- The selected stored byte is replaced with 11100110.
- The write does not inherently change RAM[9].
- A later read of row 4 selects the new contents.
- The output data is 11100110, which equals 230 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 230
State and memory · Problem 0153
RAM[11] initially stores 184. Write 11 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 10111000 (184 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 00001011.
- The selected stored byte is replaced with 00001011.
- The write does not inherently change RAM[0].
- A later read of row 11 selects the new contents.
- The output data is 00001011, which equals 11 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 11
State and memory · Problem 0154
RAM[2] initially stores 197. Write 48 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 11000101 (197 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 00110000.
- The selected stored byte is replaced with 00110000.
- The write does not inherently change RAM[7].
- A later read of row 2 selects the new contents.
- The output data is 00110000, which equals 48 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 48
State and memory · Problem 0155
RAM[9] initially stores 210. Write 85 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 11010010 (210 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 01010101.
- The selected stored byte is replaced with 01010101.
- The write does not inherently change RAM[14].
- A later read of row 9 selects the new contents.
- The output data is 01010101, which equals 85 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 85
State and memory · Problem 0156
RAM[0] initially stores 223. Write 122 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 11011111 (223 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 01111010.
- The selected stored byte is replaced with 01111010.
- The write does not inherently change RAM[5].
- A later read of row 0 selects the new contents.
- The output data is 01111010, which equals 122 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 122
State and memory · Problem 0157
RAM[7] initially stores 236. Write 159 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 11101100 (236 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 10011111.
- The selected stored byte is replaced with 10011111.
- The write does not inherently change RAM[12].
- A later read of row 7 selects the new contents.
- The output data is 10011111, which equals 159 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 159
State and memory · Problem 0158
RAM[14] initially stores 249. Write 196 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 11111001 (249 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 11000100.
- The selected stored byte is replaced with 11000100.
- The write does not inherently change RAM[3].
- A later read of row 14 selects the new contents.
- The output data is 11000100, which equals 196 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 196
State and memory · Problem 0159
RAM[5] initially stores 6. Write 233 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 00000110 (6 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 11101001.
- The selected stored byte is replaced with 11101001.
- The write does not inherently change RAM[10].
- A later read of row 5 selects the new contents.
- The output data is 11101001, which equals 233 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 233
State and memory · Problem 0160
RAM[12] initially stores 19. Write 14 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 00010011 (19 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 00001110.
- The selected stored byte is replaced with 00001110.
- The write does not inherently change RAM[1].
- A later read of row 12 selects the new contents.
- The output data is 00001110, which equals 14 decimal.
- The address determines WHERE the information is stored; the data determines WHAT is stored.
Final answer: 14