22-Elec-A4 Digital Systems and Computers · December 2015
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated
A flip-flop excitation table and a sheet of Boolean identities are attached as page 8.
Reference texts.
ldaa/staa instruction pair and port D bit assignments used in Question 4.Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Check — a printing inconsistency in the source. The question text specifies 16K × 4 chips, but the boxes drawn in the figure are each labelled “16K x 8”. The drawn topology settles it: the figure shows chips stacked two per column sharing one chip select, which is the classic width-expansion arrangement and is only meaningful for ×4 parts (one chip per nibble). Eight-bit-wide chips would need no pairing at all — four of them in a single row would fill the 64 Kbyte space. The solution below therefore follows the 16K × 4 specification in the question text, and the “16K x 8” box legend is treated as a typographical error. An examiner would expect this to be stated as an assumption under the paper's own instruction to declare any interpretation made.
Given. An 8-bit CPU requiring a 64 Kbyte address space, and memory chips organised as 16K × 4.
| Quantity | Symbol | Value |
|---|---|---|
| Total memory required | $N$ | 64 Kbyte $= 65\,536$ bytes |
| CPU data width | $w$ | 8 bits |
| Words per chip | $n_{c}$ | 16K $= 16\,384$ |
| Bits per chip word | $w_{c}$ | 4 |
Find. (a) the number of chips and the bus widths written into the figure, (b) the chip-select decoding logic with its Boolean expressions, and (c) the address range of each chip.
Approach. Size the array in two independent directions — width first (how many chips to make one byte) and then depth (how many such banks to fill the space) — then split the address bus into the low lines that go to every chip and the high lines that select between banks.
| Blank | Value |
|---|---|
| Address bus width | 16 ($A_{15}-A_{0}$) |
| Data bus width | 8 ($D_{7}-D_{0}$) |
| Address lines to each chip | 14 ($A_{13}-A_{0}$) |
| Data lines, upper chip of each pair | 4 ($D_{7}-D_{4}$) |
| Data lines, lower chip of each pair | 4 ($D_{3}-D_{0}$) |
| Number of chips | 8 (4 banks × 2) |
[Figure not reproduced: Q5 completed memory system: four banks of two 16K × 4 chips, with one OR gate per bank generating the active-low chip select. See the official exam paper.]
The connections follow from the sizing: $A_{13}\ldots A_{0}$ run to all eight chips in parallel, the upper chip of each pair drives $D_{7}-D_{4}$ and the lower drives $D_{3}-D_{0}$, and the two chips of a bank share the one $\overline{CS}$. Because exactly one of the four expressions is low for any $A_{15}A_{14}$ combination, only one bank ever drives the data bus and there is no contention.| Bank | $A_{15}A_{14}$ | Chips | Address range | Size |
|---|---|---|---|---|
| 0 | 00 | chips 1 & 2 | $\mathtt{0000}_{16}$ – $\mathtt{3FFF}_{16}$ | 16K |
| 1 | 01 | chips 3 & 4 | $\mathtt{4000}_{16}$ – $\mathtt{7FFF}_{16}$ | 16K |
| 2 | 10 | chips 5 & 6 | $\mathtt{8000}_{16}$ – $\mathtt{BFFF}_{16}$ | 16K |
| 3 | 11 | chips 7 & 8 | $\mathtt{C000}_{16}$ – $\mathtt{FFFF}_{16}$ | 16K |
| Item | Result |
|---|---|
| Chips required | 8 = 4 banks × 2 chips per bank |
| Address bus / data bus | 16 lines / 8 lines |
| Lines to each chip | 14 address ($A_{13}-A_{0}$), 4 data |
| Bank select lines | $A_{15}, A_{14}$ |
| Decode logic | $\overline{CS}_{k}$ = 2-input OR of $A_{15},A_{14}$ with polarity per bank (a 2:4 active-low decoder) |
| Ranges | $\mathtt{0000}$–$\mathtt{3FFF}$, $\mathtt{4000}$–$\mathtt{7FFF}$, $\mathtt{8000}$–$\mathtt{BFFF}$, $\mathtt{C000}$–$\mathtt{FFFF}$ (hex) |