Bit: binary (0|1) digit Byte: 8 "contiguous" bits
|
"Word": {2,4,8,…} "contiguous" bytes
|
Integer
|
Real
|
For n bits:
|
Important values of 2n:
|
Wraparound
Mistake signed for unsigned → "false contour":
| unsigned | signed | |
|---|---|---|
![]() |
|
Fixed point integers
Scaled integers
(-1)signbit × 2(exponent-E) × (1 + fraction × 2-F)
Exponent
|
Fraction
|
(-1)signbit × 2(exponent-E) × (1 + fraction × 2-F)
Special values of (exponent, fraction)
|
Decimal ranges
NB: quantization is nonlinear:
[demo] (requires Java) |
Integer
|
Floating-point
|
Character
|
String: sequence of characters
|
Subset of possible 1-byte characters
Most portable type
Bitwise conversion: bytes ↔ text
|
Most portable "byte stream"
|
binary
hexadecimal
ISO Latin-1
|
unsigned integer
signed integer
IEEE floating-point
|
decimal -3.1415927
binary 1 10000000 10010010000111111011011
Wikipedia
optional