Next: , Previous: Signed integer types, Up: Primitive types   [Contents]


3.1.1.2 Unsigned integer types

There are five primitive unsigned integer types: uint, uint8, uint16, uint32 and uint64.

Except for uint, the width in bits of each of these is given by the numeric suffix in its name.

The width in bits of uint is implementation defined, but must be at least 32-bits. It must be equal to the width of the type int.

Values of the type uint8 must be in the range 0 (2^0 - 1) to 255 (2^8 - 1), both inclusive.

Values of the type uint16 must be in the range 0 (2^0- 1) to 65535 (2^16 - 1), both inclusive.

Values of the type uint32 must be in the range 0 (2^0 - 1) to 4294967295 (2^32 - 1), both inclusive.

Values of the type uint64 must be in the range 0 (2^0 - 1) to 18446744073709551615 (2^64 - 1), both inclusive.

Values of the type uint must be in the range 0 (2^0 - 1) to 2^N - 1, both inclusive; N being the width of uint in bits.