fluca1978 said:
Taling with a colleague of mine a doubt arise: is 64 bit computer exactly the double of 32 bit computing? I don't think so, but my colleague states that having 64 bit instructions means that almost every program will occupy double space in on-disk, memory footprint and will produce much more cache miss.
My opinion is that being many instruction 32 bit compatible they can be compressed either on disk and ram and that cache should have been adjusted to reflect the new instruction format. Any comment?
It's interesting as you used the term double in the sense of "twice" or 2*n. I for a moment thought you meant double as in floating point precision.
Maybe your thinking of signed vs unsigned ranges which are relative to real numbers by taking up the same space with zero not at the minimum value point but closer to a median point. Either way they take up the same space where signed integers are used for integers which require negative representation. (i.e. 3-pole switch).
The sizeof
[1] integer has a larger maximum from 32 to 64 bits.
unsigned int max value on 32-bit is:
0 to 4,294,967,295
unsigned int max value on 64-bit is:
0 to 18,446,744,073,709,551,615
Bits (i.e. Binary Units) are based on two's compliment
[2]. It can't be twice the value but closer to an exponent. Not faster either but with higher value int but more like a higher resolution where applicable.
[1] https://en.wikipedia.org/wiki/Sizeof
[2]https://en.wikipedia.org/wiki/Two's_complement
Control is given to the programmer in how much memory is used by declaring primitive types such as char, int, double, float. Signed and unsigned define range while short, long, long long control how large or small the byte value is at compile time.
[3]
[3] https://en.wikipedia.org/wiki/C_data_types#Basic_types
I hope you find this information useful. Here is another link :stud:
https://en.wikipedia.org/wiki/Integer_(computer_science)#Common_long_integer_sizes