Mar 19, 2012 at 7:07pm UTC
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.
Mar 19, 2012 at 7:25pm UTC
With x bits, you can address a theoretical maximum of 2^x bytes.
Mar 19, 2012 at 8:33pm UTC
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.
Mar 19, 2012 at 8:44pm UTC
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
Mar 19, 2012 at 8:45pm UTC
Mar 20, 2012 at 2:37am UTC
This is no quiz question. I just want to understand memory and max bit sizes in C++.
Thanks for your help guys,
Mar 20, 2012 at 12:35pm UTC
In C++, most of the variable sizes are dependent on your compiler.
Mar 20, 2012 at 6:30pm UTC
Thanks L B for getting back to me,