0

A 32-bit register can store 232 different values. The signed range of integer values that can be stored in 32 bits is -2,147,483,648 through 2,147,483,647 (unsigned: 0 through 4,294,967,295). Hence, a processor with 32-bit memory addresses can directly access 4 GiB of byte-addressable memory.

https://en.wikipedia.org/wiki/32-bit

What confuses me is that we are talking about a 32-bit processor which can address 232 different addresses. But now 232 is in bytes and not bits, why is that?

phuclv
  • 37,963
  • 15
  • 156
  • 475
Maik Klein
  • 15,548
  • 27
  • 101
  • 197
  • 3
    Because you can't typically address anything smaller than a byte in memory. If you need a particular bit, read a byte/halfword/word/whatever, and extract the bit you need using bitwise logic. – Michael Aug 23 '15 at 19:54
  • @Michael: Post that as an answer! – icktoofay Aug 23 '15 at 19:55

2 Answers2

2

The smallest addressable unit in memory is a byte (exceptions to this rule exist, but you were asking about x86 specifically). So if your addresses are N-bit, you can represent 2^N different addresses, which means that you can address 2^N individual bytes.

Michael
  • 57,169
  • 9
  • 80
  • 125
1

Each unique address points to a byte of memory in the address map, and not a bit. In other words, memory is byte addressable that's why 32bits can address 4GBytes.

Sunil Singh
  • 11,001
  • 2
  • 27
  • 48