Jump to content

Addressable memory of 32-bit processor (calculation)


Recommended Posts


A word size is characteristic to a given computer architecture. It denotes the number of bits that a CPU can process at one time. Historically it has been sized in multiples of four and eight bits (nybbles and bytes, respectively), so sizes of 4, 8, 12, 16, 24, 32, 48, 64, and larger came into vogue with technological advances.

Very often, when referring to the word size of a modern computer, one is also describing the size of address space on that computer. For instance, a computer said to be "32-bit" also usually allows 32-bit memory addresses; a byte-addressable 32-bit computer can address 232 = 4,294,967,296 bytes of memory, or 4 gibibytes (GB). This seems logical and useful, as it allows one memory address to be efficiently stored in one word.

I don't understand the sentence in bold. "This seems logical and useful" refers to what?

I came across this question

Consider a hypothetical 32-bit microprocessor having 32-bit instructions composed of two fields: the first byte contains the opcode and the remainder the immediate operand or an operand address. What is the maximum directly addressable memory capacity?


An operand or operand address is in 3-bytes long (32 bits - 1 byte = 24 bits)

Addressable memory= 2^24 words

= 2^24 x 4 bytes

= 0.0625 GB

Why does not the calculation for addressable memory for byte-addressable 32-bit computer (WIKIPEDIA) exlude bit(s) for opcode like that in the question (that uses 2^24 instead of 2^32)? Byte-addressable processor doesn't have opcode?! I know that Intel 32-bit desktop processor like Pentium 4 can hold only 4GB theoritically. So is the processor in the question a word-addressable and the Pentium 4 a byte-addressable processor?

Link to comment
Share on other sites

This seems logical and useful, as it allows one memory address to be efficiently stored in one word.

What they're talking about is, if you have 32 bit memory addresses, you can easily store that in a 32 bit register, which is rather logical indeed.

Compare that to say, in the old PC XT days, with 20 bit memory addresses and 16 bit registers where we were stuck with segmented memory. That sucked, but 20 bit addressing gave us 1MB usable instead of a mere 64KB a 16 bit address would have limited us to (that would have been crippling)

Now, it's a little more complicated than that. Modern processors have more than one operating modes (real, protected, virtual, etc) where addressing methods can change. And the Pentium 4 like you were referring to (actually, any CPU since the Pentium Pro) has more than 32 bit address pins. It actually has 36 of them, but you have to use PAE for that (still using 32 bit virtual addresses, but using page tables to map 4GB "windows" in that 64GB that's physically addressable). And 64 bit CPUs (x64) may have 64 bit registers, but don't have a 64 bit address bus as it would be pointless (and to some extent detrimental). They currently "only" have 48 address pins, limiting us to a mere 256TB address space.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...