🔢
Number Base Converter
Convert between binary, octal, decimal, and hexadecimal in real-time. Includes bit visualization and programming notation.
Mode
Bits
Bit Visualization(32-bit)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
💡 How to Use
Enter a number in any base field and the other bases update automatically. Binary accepts only 0 and 1, octal 0–7, decimal 0–9, and hexadecimal 0–9 and A–F. Toggle between signed and unsigned mode to see how negative numbers are represented. Select a bit width (8, 16, or 32-bit) to visualize the actual bit pattern stored in memory. Use the copy button next to each result to save it to your clipboard.
Related Tools
FAQ
What is a number base (radix)?▼
A number base (or radix) is a system for representing numbers. Decimal uses 10 digits (0–9), binary uses 2 (0 and 1), and hexadecimal uses 16 (0–9 and A–F). Computers work in binary internally, and programmers often use hexadecimal as a compact shorthand.
Why is hexadecimal used in programming?▼
One hex digit maps exactly to 4 binary bits, making long binary strings much shorter and easier to read. Hexadecimal is widely used for color codes (#FF5733), memory addresses (0x7FFF), MAC addresses, and more.
How are negative numbers represented in computers?▼
Most systems use two's complement notation. The most significant bit (MSB) indicates the sign: 1 for negative, 0 for positive. For example, -1 in 8-bit is 11111111 (binary) or FF (hex). You can see this in action by switching to signed mode in this tool.