r/AskComputerScience 19d ago

Difference between address width, addressability and word size.

I’ve been reading through a computer systems book to become a more knowledgable programmer and I’m not fully understanding the difference between the concepts of address width, addressability and word size. This is how I currently understand them:

Address width refers to the size of pointer data — that is, the value of the pointer. The address width determines how many possible addresses are capable of representation and thus, is one factor in determining the total size of addressable memory.

Addressability refers to the size of data stored at a given address.

Word size refers to the “natural” unit of instruction of the processor. Conventionally, most CPU registers have a width that corresponds with the address width so that a full pointer fits inside a single register. This simplifies the set of operations necessary for the CPU to understand.

I think the connection between address width and word size is what I’m most confused about. For example, if the address width was 2x the word size, would that mean that the CPU would need a combined “read+move” instruction to fully process a single pointer?

4 Upvotes

6 comments sorted by

View all comments

1

u/Syresiv 19d ago

For example, if the address width was 2x the word size

In that case, you'd have to architect the CPU around the constraint that you can't refer to any arbitrary address in a single instruction.

That combined read+move isn't necessarily the only solution, but it is a solution. You could also have an address space register that stores the upper half of the address, or read an address from two registers instead of one.