# Finding bits per address in memory

I dont know if this is any important IRL, but I am trying to understand lines below.

4K words of main memory (this implies 12 bits per address).

4M X 16 means the memory is 4M long (4M = $$2^2 \times 2^{20} = 2^{22}$$ words) and it is 16 bits wide (each word is 16 bits).

So, how bits per address is really calculated, what does 4K/4M represents and how does that formula in parenthesis works?

• Please ask only one question per post. I see three questions here. We prefer questions that are likely to be useful to others in the future, even if they're not looking at the exact same exercise or task as you.
– D.W.
May 28, 2022 at 20:06

• K (Kilo): $$2^{10}$$
• M (Mega): $$2^{20}$$
• G (Giga): $$2^{30}$$
• T (Tera): $$2^{40}$$
The next one is P (Peta), but it is not in common usage. Usually these suffixes are accompanied by another unit, for example KB (Kilobyte, or $$2^{10}$$ bytes) or MHz (Megahertz, or $$2^{20}$$ cycles per second).
Using $$n$$ bits, you can address $$2^n$$ words.