What is the largest memory

Out of curiosity I was wondering what is the largest memory space (i.e., program) that can be addressed by processors with the following number of address bits?
a. 12 bits
b. 16 bits
c. 24 bits
d. 32 bits
e. 48 bits
f. 64 bits
I have no code but would like to generate some to prove this and was looking for help.

Thanks,
Pooshi
With x bits, you can address a theoretical maximum of 2^x bytes.
hehe, sounds like a quiz question, and Athar took the bate. :-P I usually respond to these questions after they have aged like 1 day or so, just to make sure.

I could be wrong, though. No doubt.
If you know the math you can address any number of bits you want.

If you mean atomically, an x-bit platform can address exactly x-bits at once.

Except that in C++ there is a guarantee that the smallest variable type will be 8 bits. (its in the standard and has to do with supporting the minimum character set)

Also note that you can address x-y bits at once on a z-bit platform. The relationship between x, y, and z shall not be discussed until division by zero has been given a widely accepted definition.
Last edited on
This is no quiz question. I just want to understand memory and max bit sizes in C++.
Thanks for your help guys,
Bob
In C++, most of the variable sizes are dependent on your compiler.
Thanks L B for getting back to me,

Pooshi
Topic archived. No new replies allowed.