Memory addressing in WinXP

  • Thread starter Thread starter Mitchell R. Drews
  • Start date Start date
M

Mitchell R. Drews

As far as I understand WinXP has a RAM cap of 4
gigabytes. Now I was trying to determine how many bits
are in the memory addressing of win XP and I came up w/ a
number of 40, meaning a 40 bit string would be necessary
to give an exact location 'if' the system was at the cap
of 4 gigs. I know they use hex for memory addresses, but
I'm not worrying about that right now. Here's how I came
to that conclusion:


1,099,511,627,776 possible memory locations in a 4 gig
memory size, given memory locations are single bits.

40 bits necessary to reach a number that high
2^40 = 1,099,511,627,776

2^8 = 1 byte (256)
Byte x 1024 = 1 kilobyte (262,144)
kilobyte x 1024 = 1 megabyte (268,435,456)
1 megabyte x 1024 = 1 gigabyte (274,877,906,944)
1 gigabyte x 4 = 4 gigabyte (1,099,511,627,776)

I have two questions does windows dynamically change the
length of the memory address depending on how much memory
is in the computer? Or is the length hard coded into the
operating system? This really has no relevance to
anything I'm trying to do, but I just want to know. Thnx

-Mitchell R. Drews
 
Mitchell R. Drews said:
As far as I understand WinXP has a RAM cap of 4
gigabytes. Now I was trying to determine how many bits
are in the memory addressing of win XP and I came up w/ a
number of 40, meaning a 40 bit string would be necessary
to give an exact location 'if' the system was at the cap
of 4 gigs. I know they use hex for memory addresses, but
I'm not worrying about that right now. Here's how I came
to that conclusion:


1,099,511,627,776 possible memory locations in a 4 gig
memory size, given memory locations are single bits.
Memory locations are NOT bits, they're BYTES (8 bits per BYTE).
40 bits necessary to reach a number that high
2^40 = 1,099,511,627,776

Wrong. With 32 bits you can address 2^32 = 4294967296 bytes (4GB). You
don't access individual bits, you access bytes. There are instructions that
allow you to test bits within the byte but the CPU accesses whole bytes (or
multiples thereof) only.

Tom Lake

Tom Lake
 
Back
Top