Question: I am reading some C text at the address: 

<https://cs.senecac.on.ca/~lczegel/BTP100/pages/content/compu.html>

In the section: **Addressible Memory** they say that "*The maximum size of addressable primary memory depends upon the size of the address registers.*"

I do not understand why is that.

Can anyone give me a clear explanation, please?

Thanks a lot.

Answer: 
If you have 32-bit registers, then the highest address you can store in a single register is 2^32-1, so you can address 2^32 units (in modern computers, units are almost always bytes). A larger number simply won't fit.

You can get around this by using memory addresses that are larger than a single register can hold (and some CPUs/operating systems have features for doing so), but using addresses/pointers will be slower because it has to fiddle with multiple registers.

As an example, suppose you have 32-bit registers but 64-bit pointers and want to increment a pointer to find the next item in an array of `char` (`++p`). Instead of performing a simple increment instruction, the processor will have to

1. Increment the lower 32 bits;
2. check if the result is zero (overflow);
3. increment the upper half as well if overflow occurred.

Simplifying a bit, this means it has to perform a branch (if-then-else) instruction, which is one of the slowest and most complex instructions a modern CPU performs.

(See, e.g., [x86 memory segmentation](https://secure.wikimedia.org/wikipedia/en/wiki/X86_memory_segmentation) on the Wikipedia for a multi-register addressing scheme used in Intel processors.)
If you have 1 address register, holding a 16 bit address, you can have a maximum of 2^16 - 1 addresses.

However many registers, the number of addresses they can point to will be limited by their width (number of bits).

Thus, the maximum size of addressable primary memory depends upon the size of the address registers.