IAS Memory & Formats
Everything for “calculate the memory size” and “show the memory formats” — plus the address-width formulas the memory-scaling questions rely on.
The memory
- 4096 storage locations (rows), addressed M(0) … M(4095).
- Each row / word is 40 bits wide.
- Address line = 12 bits, because .
The two master formulas
Reading memory: put a row number on the address lines → the word stored there comes out on the data lines. Example: address 100 (binary) → out comes the 40-bit word 34673497A2H.
| Rows | Address width = |
|---|---|
| 4 (00…11) | 2 bits |
| 8 (000…111) | 3 bits |
| 1024 | 10 bits |
| 4096 | 12 bits |
| 65,536 | 16 bits |
Total memory size (Autumn-25 Q1b, Summer-24)
“IAS has a 12-bit memory address. What is the total capacity — in bits, bytes and words?”
Answer: 163,840 bits = 20,480 bytes = 4096 words (= 20 KB).
Memory scaling (Autumn-24 Q1b, Spring-26 Q1b)
“If main memory were increased by times, what is the new address size? What is the max n for which the instruction size would not change?”
Multiplying the number of rows by adds n bits to the address:
The IAS address field is 12 bits (each instruction = 8-bit opcode + 12-bit address). The instruction format only stays unchanged while the address still fits in 12 bits, i.e. → max n = 0. Any growth () needs a wider address field, changing the instruction size.
Memory formats — Figure 1.7
A 40-bit word can hold either a number or two instructions.
(a) Number word (40 bits)
(b) Instruction word (40 bits) = TWO instructions
Each instruction = 8-bit opcode + 12-bit address = 20 bits; two of them fill the 40-bit word (left = bits 0–19, right = bits 20–39). Note the 12-bit address field exactly matches the 12-bit address line (4096 rows) — which is why the memory can’t grow without changing the format.