Thursday, February 19, 2009

BitsNameRangeDecimal digitsUses
8byte, octetSigned: −128 to +1273ASCII characters, C/C++ char, C/C++ int8_t, Java byte, C# byte
Unsigned: 0 to +2553
16halfword, wordSigned: −32,768 to +32,7675UCS-2 characters, C/C++ short, C/C++ int16_t, Java short, C# short, Java char
Unsigned: 0 to +65,5355
32word, long, doubleword, longwordSigned: −2,147,483,648 to +2,147,483,64710UCS-4 characters, Truecolor with alpha, C/C++ long, C/C++ int32_t, Java int, C# int, FourCC
Unsigned: 0 to +4,294,967,29510
64doubleword, longword, long long, quad, quadwordSigned: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,80719C/C++ long long, C/C++ int64_t, Java long, C# long
Unsigned: 0 to +18,446,744,073,709,551,61520
128octawordSigned: −170,141,183,460,469,231,731,687,303,715,884,105,728 to +170,141,183,460,469,231,731,687,303,715,884,105,72739C only available as non-standard compiler-specific extension
Unsigned: 0 to +340,282,366,920,938,463,463,374,607,431,768,211,45539
nn-bit integer (general case)Signed: ( − 2n − 1) to (2n − 1 − 1) Ada range 2**(n-1) .. 2**n;
Unsigned: 0 to (2n − 1) Ada mod 2**n;
Integer Storage

n-bit integer
(general case)

Signed:
( − 2n − 1) to (2n − 1 − 1)
Unsigned:
0 to (2n − 1)

Decimal Digits:




Signed Unsigned Decimal Digits
( − 2n − 1) to (2n − 1 − 1) 0 to (2n − 1) \lceil (n-1) \log_{10}{2} \rceil
\lceil n \log_{10}{2} \rceil