Title is a question for my Computer Architecture homework. My problem is i can't figure out the correct units for the formula.

I know the formula for max memory size should be:

TotalSizeOfMemory = Addressability x 2^NumberOfBits

My question is, should the addressability be expressed in bytes or bits? And is the result expressed in bits or bytes? thanks


2

There are 2 answers

0
Erik Eidt On BEST ANSWER

My question is, should the addressability be expressed in bytes or bits?

It is reasonable to specify the unit of addressability in bytes or bits (or both), though when the unit of addressability is 2 bytes aka 16 bits, many would commonly call that a "Word" of memory (to differentiate from the standard 8-bit Byte).

And is the result expressed in bits or bytes?

  •  1 Word per Location × # Locations = # of Words
  •  2 Bytes per Location × # Locations = # of Bytes
  • 16 Bits per Location × # Locations = # of Bits

Notice how the unit Location cancels out, because it is in the denominator for the first factor (units per Location) and in the numerator for the second factor — thus, the unit that is left for the whole formula is simply the number of words, bytes, or bits, depending on how you choose to express the unit of addressability.

0
Peter Cordes On

Whatever unit you use for Addressability is the same unit that your TotalSizeOfMemory will be in.

Same as doing 2 meters * 1024 to get 2048 meters, vs. 2 feet * 1024 to get 2048 feet. Bit and Byte are both units of storage capacity / addressability, they're not dimensionless. The dimensions of both sides of an equation have to match. (https://en.wikipedia.org/wiki/Dimensional_analysis)

Since you were given addressability = 2 bytes, you could use that directly to get capacity in bytes, or use 16 bits to get capacity in bits. It's still only addressable in units of 2-byte words, though. (And I'm assuming for simplicity that a byte is 8 bits, not some other size like on some historical machines.)