0
$\begingroup$

I'm interested in how does cpu read 32 bit word from memory .If the processor has 32 bits of address space then it can address 4,294,967,295 locations (or 4 gb) Does this mean that each location has 32 bits.?

$\endgroup$
2
  • $\begingroup$ What do you mean by "how"? $\endgroup$
    – Raphael
    Commented Feb 16, 2018 at 11:16
  • $\begingroup$ Modern computers are byte addressable. Each address refers to one 8-bit byte. When the processor wants to load/store a larger size, consecutive addresses are accessed. The memory understands these larger requests: several different transfer sizes can be requested as part of the cpu-memory bus protocol. $\endgroup$
    – Erik Eidt
    Commented Feb 18, 2018 at 1:04

1 Answer 1

2
$\begingroup$

Address Space and Word Size are indeed two different things. If my processor has an $n$ bit address space, then it can address $2^n$ addresses. Note that this is merely the number of addresses and is not $2^n$ GB.

The word size of a memory refers to the size of the smallest addressable unit of the memory. In other words if my processor has an $n$ bit address space and a word-size of $b$ bytes, then my processor can address $2^n$ locations each of which are $b$ bytes long.

$\endgroup$
2
  • 1
    $\begingroup$ Addresses are often byte-based even if the machine word is larger. $\endgroup$ Commented Feb 16, 2018 at 12:52
  • $\begingroup$ That cleared up a preconceived notion. Thanks. $\endgroup$
    – Sagnik
    Commented Feb 16, 2018 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.