Number Base Converter
Convert numbers between binary, octal, decimal and hex.
Quick reference table
| Dec | Bin | Oct | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 4 | 100 | 4 | 4 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
Online number base converter: binary, octal, decimal, and hexadecimal
Different base number systems are fundamental in computer science and programming. The binary system (base 2) is the native language of computers. Octal (base 8) is used in Unix file permissions. Hexadecimal (base 16) is the preferred format for CSS colors, memory addresses, and byte values.
Our converter lets you enter a number in any of the four bases and instantly see its representation in all others. It is especially useful for programmers working with bit-level operations, web developers converting hexadecimal colors, and system administrators.
The quick reference table includes the most common values needed in daily programming: powers of 2, the maximum byte value (255), and other frequent values with standard prefixes (0b, 0o, 0x).
Frequently asked questions
What is the hexadecimal system used for?
Hexadecimal is especially useful because it allows representing a complete byte (8 bits) with just two digits. It is used extensively in programming for CSS colors (#RRGGBB), memory addresses, error codes, and any context where a compact representation of binary data is needed. The digits range from 0 to 9 and A to F (where A=10, B=11, C=12, D=13, E=14, F=15).
How do Unix permissions work in octal?
In Unix/Linux, file permissions are represented with three octal digits (like 755). Each digit encodes read (4), write (2), and execute (1) permissions for the owner, group, and others respectively. For example, 755 means: owner can read+write+execute (7=4+2+1), group can read+execute (5=4+1), and others can read+execute (5=4+1).
Does it support negative numbers?
Yes, the converter supports negative numbers in decimal base. When entering a negative number, the result will show the minus sign in front of the representation in each base. Note that in real systems, negative numbers are represented using two's complement in binary, but our tool shows the signed representation for clarity.