Number Base Converter
Convert between binary, hexadecimal, decimal, and octal number systems.
Common Values Reference
| Decimal | Hex | Binary | Octal |
|---|---|---|---|
| 8 | 0x08 | 0000 1000 | 10 |
| 16 | 0x10 | 0001 0000 | 20 |
| 32 | 0x20 | 0010 0000 | 40 |
| 64 | 0x40 | 0100 0000 | 100 |
| 128 | 0x80 | 1000 0000 | 200 |
| 255 | 0xFF | 1111 1111 | 377 |
| 256 | 0x100 | 1 0000 0000 | 400 |
| 65535 | 0xFFFF | 1111 1111 1111 1111 | 177777 |
Understanding Number Bases
Binary (Base 2)
Uses digits 0-1. The native language of digital circuits and computers. Each digit represents a power of 2.
Octal (Base 8)
Uses digits 0-7. Less common today but still used in some Unix/Linux file permissions.
Decimal (Base 10)
Uses digits 0-9. The standard human-readable number system we use daily.
Hexadecimal (Base 16)
Uses 0-9 and A-F. Compact representation of binary data. 1 hex digit = 4 binary bits.
Common Uses in Electronics
Frequently Asked Questions
How do I convert binary to decimal?
Multiply each binary digit by its position value (powers of 2) and sum them. For example: 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11
Why is hexadecimal commonly used?
Hex is compact (1 hex digit = 4 bits) and easy to convert to/from binary. It's widely used in programming, memory addressing, and color codes.
What do prefixes like 0x and 0b mean?
0x indicates hexadecimal, 0b indicates binary, and 0o indicates octal. These prefixes help distinguish the number base in code.