Skip to content

Memory Organization and Memory Interfacing

COA
└── Memory Organization
├── Memory Hierarchy
├── Semiconductor Memory
├── Memory Chip Organization
│ ├── Address lines
│ ├── Data lines
│ ├── Capacity
│ ├── Memory chips
│ ├── Memory expansion
│ └── Memory interfacing 👈
├── Memory Interleaving
└── Cache Memory

Memory is represented as:

Number of Words × Word Size

Example:

64K × 8

means:

  • Number of words = 64K = 64 × 1024 = 65,536 words

  • Each word = 8 bits

Total memory capacity

= Number of words × Word size
= 64K × 8 bits
= 512 Kbits
= 64 KB

Another example:

32K × 16

means

  • 32K memory locations

  • Each location stores 16 bits


A word is one addressable memory location.

Number of words = Number of addressable memory locations (addresses)

Example:

Memory = 8 × 4
Address Data
000 1010
001 1101
010 0001
...

There are 8 words.

Each word stores 4 bits.


Each memory location has a unique address.

If there are N memory locations,

Addresses = 0 to N−1

Number of bits stored in one memory location.

Examples

64K × 8

Word size = 8 bits

16K × 32

Word size = 32 bits


If memory has N words,

Address Lines = ⌈log₂(N)⌉

where

N = Number of memory locations (words)

NOT total bits.


Each address line has two possible values.

1 line → 2 addresses
2 lines → 4 addresses
3 lines → 8 addresses
n lines → 2ⁿ addresses

Therefore,

2ⁿ ≥ Number of words

Memory = 64K × 8

Number of words

64K
= 64 × 1024
= 65536
= 2¹⁶

Hence

Address lines = 16

Memory = 1M × 32
1M = 1024K
= 2²⁰

Hence

20 address lines

Memory = 96K × 16
96K = 98304

Now,

2¹⁶ = 65536
2¹⁷ = 131072

Since

65536 < 98304 < 131072

Hence

Address lines = 17

Data lines depend only on the word size.

Data Lines = Word Size

Examples

64K × 8
Data lines = 8
32K × 16
Data lines = 16
96K × 16
Data lines = 16

Capacity
= Number of Words × Word Size

Convert into

  • bits

  • bytes


32K × 8
32 ×1024 ×8
=262144 bits
=32768 bytes
=32 KB

64K ×16
65536 ×16
=1048576 bits
=131072 bytes
=128 KB

Memory expansion is of two types.

1. Word Expansion
2. Bit Expansion

Used when

Required word size >

Available chip word size


Example

Need

64K ×16

Available chips

64K ×8

Each chip provides

8 bits

Need

16 bits

Therefore

Number of chips
=16/8
=2

Connection

Address Bus
┌────┴────┐
│ │
64K×8 64K×8
│ │
D0-D7 D8-D15

Both chips receive the same address.

Together they produce

64K ×16

8. Word Expansion (Increase Number of Words)

Section titled “8. Word Expansion (Increase Number of Words)”

Used when

Required words >

Available chip words


Example

Need

64K ×8

Available

32K ×8

Need

64K words

Each chip

32K words

Hence

Number of chips
=64K/32K
=2

One extra address line selects the chip.

A15
Decoder
┌─────┐
│ │
Chip1 Chip2

Example

Need

128K ×16

Available

64K ×8

Word expansion

128K/64K
=2

Bit expansion

16/8
=2

Total chips

2×2
=4

Number of chips
=(Required Words / Chip Words)
×
(Required Word Size / Chip Word Size)

Need

128K ×16

Available

64K ×8
Words
128K/64K=2
Bits
16/8=2
Total Chips
2×2=4

Sometimes memory size is not a power of 2.

Example

96K ×16

Since

96K
=64K+32K

Memory is implemented as

64K ×16
+
32K ×16

Therefore

Number of memory blocks =2

Another example

160K
=128K+32K

Blocks

128K
+
32K

Hence

2 blocks

Example

192K
=128K+64K

Blocks

128K
+
64K

Again

2 blocks

Decoder selects one memory chip among multiple chips.

If there are

2 chips

Need

1-to-2 decoder

If

4 chips

Need

2-to-4 decoder

If

8 chips

Need

3-to-8 decoder

General rule

For N chips
Decoder input
= log₂(N)

= ⌈log₂(Number of Words)⌉

= Word Size

= Words × Word Size

=(Required Words / Chip Words)
×
(Required Word Size / Chip Word Size)

= log₂(Number of Chips)

Find address lines.

Example

32K ×8
Answer
15

Find data lines.

Example

64K ×16
Answer
16

Find memory capacity.

Example

128K ×8
Answer
128 KB

Find number of chips.

Example

Need

256K ×16

Available

64K ×8

Answer

Words
256K/64K=4
Bits
16/8=2
Total Chips
=8

Find decoder size.

Example

Need

4 chips

Answer

2-to-4 decoder

Find memory blocks.

Example

96K ×16

Answer

64K ×16
+
32K ×16
=2 blocks

  • Address lines depend only on the number of words, never on the word size.

  • Data lines are exactly equal to the word size.

  • Capacity = Words × Word Size.

  • If the number of words is not a power of 2 (e.g., 96K, 160K, 192K), split it into sums of powers of 2 to determine memory blocks.

  • Bit expansion increases the word size, word expansion increases the number of memory locations.

  • Total chips required = (Word Expansion) × (Bit Expansion).