C++ 基础

Unsigned Integer

2017-09-14  本文已影响12人  费曼猫

uint_16 has 0-65535

for example, a 16-bit unsigned integer would be able to represent 65536 distinct values in the range 0 to 65535, while its signed counterpart would be able to represent, on most cases, values between -32768 and 32767.

Because this huge value is the maximum value of an unsigned long long.
So every type is set at the maximum value because they are a multiple of each maximum.

2^2 = 4
2^4 = 16
2^8 = 256
2^16 = 65536
2^32 = 4294967296
2^64 = 18446744073709551616
上一篇 下一篇

猜你喜欢

热点阅读