user133466
user133466

Reputation: 3415

On a 32bit machine, every memory location is capable of holding 1 byte of data?

for example int = x; because int is 4 bytes they would take up 4 memory locations

x x x x

Upvotes: 0

Views: 315

Answers (3)

Joshua
Joshua

Reputation: 43280

A 32 bit machine means that integers are 32 bits wide.

Whether that means an integer is four bytes or not is not actually defined. A byte is not necessarily 8 bits.

It definitely does not mean there is 4 GB RAM or 2^32 addressable cells.

The 8086 is a 16 bit machine but had 1 MB of addressable RAM. The 286 got 1MB + 64k - 16bytes, but had the ability to perform segmented memory mapping allowing use of a lot more RAM (4MB I believe).

The Pentium II and up are 32 bit processors but actually support up to 64GB RAM but a process can only address 4GB at a time.

The current x64 processors cannot address 2^64 bytes of RAM.

And some machines are not even byte addressable.

Upvotes: 1

tster
tster

Reputation: 18237

It depends on the architecture. For a full breakdown see the wikipedia page on words.

NOTE: For x86 each address is 1 byte.

Upvotes: 1

Zed
Zed

Reputation: 57658

This has nothing to do with being 32 or 64 bit. Anyway, most architectures use byte addressable memory, so I guess the answer should be "Well... in a sense, yes."

Upvotes: 4

Related Questions