This page looks best with JavaScript enabled

Addressable Memory Limit According to Microprocessor Bits

 ·  🎃 kr0m

The bits of a microprocessor and the data bus limit the amount of RAM usable by the system. In this article, I will explain the different limits of an x86 microprocessor in 16, 32, and 64 bits.

The RAM memory is composed of slots of 1 byte each. To access these slots, you have to refer to their memory address, the first position starting from 0 up to X.

A microprocessor can only work in binary, which means that to access the RAM slots, it will have to indicate the position in binary. Depending on the number of bits, we can represent different memory positions:

1bit: 0/1 ➡️ 2 posiciones: 2bytes  
2bits: 00/01/10/11 ➡️ 4 posiciones: 4bytes  
3bits: 000/001/010/011/100/101/110/111 ➡️ 8 posiciones: 8bytes

As we can see, the number of slots we can refer to is 2^N where N is the number of available bits.

The first X86 microprocessor was the 8086 with 16 bits and a 20-bit data bus. This microprocessor was capable of addressing:

(2^16)/1024 = 64KB

Later, Intel devised a way to take advantage of the 4 bits of the data bus through a segmentation system. This consists of dividing the memory into blocks of 64KB and using a 16-bit register to indicate the block (segment) to be accessed and another register to indicate the displacement within this segment.

The addressing with segmentation should be able to address:

((2^16)*(2^16))/1024/1024/1024 = 4GB

But since the data bus is 20 bits, it limits us to 1MB:

(2^20)/1024/1024 = 1MB

NOTE: The memory address is obtained by a sum and a segment displacement .

With 32 bits and 64 bits, the same logic follows. The data bus is higher than the number of CPU bits , but the CPU limits addressing:

(2^32)/1024/1024/1024 = 4GB
(2^64)/1024/1024/1024/1024/1024/1024 = 16 HB
If you liked the article, you can treat me to a RedBull here