Skip to main content

Construct 2^(k+1) x n and 2^k x 4n

Short answer

(a) Depth expansion for 2^(k+1)×n: two 2^k×n modules, A_k selects module via decoder. (b) Width expansion for 2^k×4n: four 2^k×n modules in parallel share address/control lines; each provides n bits to form 4n-bit word.

Construct 2^(k+1) × n and 2^k × 4n memories using 2^k × n memory modules.

Let the base module be 2^k x n (k address lines, n data lines, enable/chip-select CS, read/write).

(a) 2^(k+1) x n: double the depth (2 modules)

The word width is the same (n) but twice the words are needed, so the address has k + 1 bits.

  • Two modules, M0 and M1, receive address lines A(k-1)..A0 in parallel.
  • The extra high-order address bit A_k selects the module through a 1-to-2 decoder (A_k itself goes to CS of M1 and its inverse to CS of M0).
  • Data lines D(n-1)..D0 of both modules are tied together (tri-state outputs, only the enabled one drives the bus).
 A(k-1)..A0 ------------+------------+
                        |            |
 A_k --+--[NOT]--> CS [ M0 ]    CS [ M1 ] <-- A_k
                       2^k x n    2^k x n
                          \          /
                      D(n-1)..D0 (shared)
A_kModuleAddresses
0M00 to 2^k - 1
1M12^k to 2^(k+1) - 1

(b) 2^k x 4n: increase the width by 4 (4 modules)

The number of words is the same (2^k) but each word must be 4n bits, so four modules are placed side by side.

  • All four modules share address lines A(k-1)..A0, CS and read/write lines.
  • Each module supplies n bits: M0 gives D(n-1)..D0, M1 gives D(2n-1)..Dn, M2 gives D(3n-1)..D2n, M3 gives D(4n-1)..D3n.
  • No decoder is needed.
 A(k-1)..A0, CS, R/W ----+--------+--------+--------+
                        [M0]     [M1]     [M2]     [M3]
                          |        |        |        |
                     D(n-1)..0  D(2n-1)..n D(3n-1)..2n D(4n-1)..3n
                         \-------- 4n-bit data bus --------/

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 4 questions →