Computing method to understand? Word addressing and byte addressing?

A 32-bit computer addresses a 256M memory so that the CPU can use it. Usually we have multiple addressing methods:

Addressing by word: For this 256M memory, its addressing range is 64M, and each memory address can store 32bit data.
Addressing by half word: For this 256M memory, its addressing range is 128M, and each memory address can store 16bit data.
Addressing by byte: For this 256M memory, its addressing range is 256M, and each memory address can store 8bit data.

The concept of address : the memory is divided into several units (small rooms). Numbering begins with unit 0. These numbers can be regarded as addresses (room numbers).

The concept of addressing : To read data from the memory, the CPU must know which unit of the memory to read, that is, specify the address. Address information is transferred to the memory through the address bus. An N-bit address bus, the maximum range that can be addressed is (0~2^N-1) The addressable space is 2 ^N bits

The number of bits of the address bus determines the size of the memory space that the CPU can directly address. It can also be said to be the most addressable capacity . The address is 4G.

Addressing by byte : The memory is divided into several units, each unit has a capacity of 1 byte, and the number (address) starts from 0.

Addressing by word : The memory is divided into several units, each unit has a capacity of 1 word (assumed to be 32 bits), and the number starts from 0.

insert image description here

A computer has a word length of 32 bits and a storage capacity of 16MB:

Addressing by word: The size of the CPU's one-time addressing is 1 word (32 bits, a unit 4B), a total of 16MB / 4B = 4M units, that is, addressing 2^22 storage units, and the address bus is 22 bits.

Addressing by byte: The size of the CPU's one-time addressing is 1 byte (8 bits, one unit 1B), and there are 16MB / 1B = 16M units in total, that is, addressing 2^24 storage units, and the address bus is 24 bits.

Guess you like

Origin blog.csdn.net/A52091/article/details/115833827