Template:cpp/language/types/range of values
From cppreference.com
Type | Size in bits | Format | Value range | |
---|---|---|---|---|
Approximate | Exact | |||
character | 8 | signed | −128 to 127 | |
unsigned | 0 to 255 | |||
16 | UTF-16 | 0 to 65535 | ||
32 | UTF-32 | 0 to 1114111 (0x10ffff) | ||
integer | 16 | signed | ± 3.27 · 104 | −32768 to 32767 |
unsigned | 0 to 6.55 · 104 | 0 to 65535 | ||
32 | signed | ± 2.14 · 109 | −2,147,483,648 to 2,147,483,647 | |
unsigned | 0 to 4.29 · 109 | 0 to 4,294,967,295 | ||
64 | signed | ± 9.22 · 1018 | −9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | |
unsigned | 0 to 1.84 · 1019 | 0 to 18,446,744,073,709,551,615 | ||
binary floating- point |
32 | IEEE-754 |
|
|
64 | IEEE-754 |
|
| |
80[note 1] | x86 |
|
| |
128 | IEEE-754 |
|
|
- ↑ The object representation usually occupies 96/128 bits on 32/64-bit platforms respectively.