Skip to main content
CodeLint.Dev Dev Tools
Examples
step
Binary base 2 0b
0010 1010
Octal base 8 0o
Decimal base 10
Hex base 16 0x
#00002A web color
Roman I–MMMCMXCIX
= XLII
Bit Width
Number Bases
Binary (2) — digits 0–1. Each position doubles. Native to digital hardware.
Octal (8) — digits 0–7. Exactly 3 binary bits per digit. Unix file permissions.
Decimal (10) — everyday counting, digits 0–9.
Hex (16) — digits 0–9 and A–F. Exactly 4 binary bits (one nibble) per digit.
Roman — additive notation, range 1–3999 (I–MMMCMXCIX).
Bit Width Guide
8-bit — 0 to 255 — uint8, byte, ASCII
16-bit — 0 to 65,535 — uint16, short
32-bit — 0 to 4,294,967,295 — uint32, int
64-bit — 0 to 18,446,744,073,709,551,615 — uint64
Two's Complement CPU native

How CPUs store negative integers. To negate: flip all bits (one's complement) then add 1. -1 in 8-bit = 11111111 (0xFF). Type a negative number and enable the toggle above.

Hex Color Codes

Web colors are 24-bit hex: #RRGGBB. If your decimal value is 0–16,777,215 a live color swatch appears on the Hex panel. Try (pure red, #FF0000).