Skip to content
BetterDL

Word (memory)

Also called: memory word, memory location, storage location, memory contents

The fixed-size group of bits stored at one memory address and always read or written as a unit. Its width is the memory's word size.

A memory is a long row of numbered boxes. Each box is a location, and the bits inside it are a word.

Every word in a given memory has the same width, the word size. A ×8 memory holds 8-bit words, a ×16 memory 16-bit words. The word is the unit of transfer: one read returns a whole word and one write replaces a whole word.

Keep three ideas apart:

  • The address says which location. It is fixed by where the location sits.
  • The word (the contents) is what is stored there. It changes whenever you write.
  • The word size is how many bits each location holds. It equals the number of data lines.

Two locations can hold the same word; contents don't have to be unique, addresses do.

The number of words is a separate number again. In a 1K × 8 memory, 1K is the number of words (which fixes the address bits), and 8 is the word size.

Careful: "word" also means a CPU's natural data size (often 32 or 64 bits). In a memory question, a word is simply whatever one address holds, even a single bit or a byte.

1
128
0
64
1
32
1
16
0
8
0
4
1
2
0
1

Worked examples

Example

A tiny 4 × 8 memory

Four locations, each holding an 8-bit word.

  1. 1.

    Address 0: 10110010. Address 1: 00000000. Address 2: 10110010. Address 3: 11110000.

  2. 2.

    Reading address 3 returns the whole word 11110000.

  3. 3.

    Addresses 0 and 2 hold the same word. That's allowed.

  4. 4.

    Size: 4 words × 8 bits = 32 bits. The 4 counts words; the 32 counts bits.

Example

Writing a word

Write 00001111 to address 1 of the memory above.

  1. 1.

    The old word at address 1, 00000000, is replaced completely.

  2. 2.

    Address 1 now holds 00001111. No other location changes.

  3. 3.

    The address is still 1; only the contents moved.

Common mistakes

  • Mixing up the address with the contents. Address 3 is the location's number; the word is what's stored there.

  • Using the bit count where the word count belongs. A 16 × 8 memory has 16 words, not 128.

  • Assuming a word is always 16 or 32 bits. In memory notation it is whatever one address holds.

Practice Word (memory)

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Word (memory) is taught in Memory and Registers.