FreeToolsAll

Radix Math: Binary (Base-2), Decimal (Base-10), and Hexadecimal (Base-16)

Reading long binary bit sequences like 1101111010101101 is exhausting and prone to human error. That is why software engineers, system programmers, and cybersecurity analysts rely on Hexadecimal (base-16) as a compact, human-readable shorthand for binary machine code. Explore our free number base converters below to calculate exact radix transitions.

Free Tools in This Category

Why Hexadecimal Is the Programmer's Best Friend

Humans count in Base-10 (Decimal) because we have ten fingers. Computers count in Base-2 (Binary) because electronic transistors have two states (conducting electricity or not). But writing binary requires enormous space: a single 32-bit memory address takes 32 characters.

Base-16 (Hexadecimal) solves this because $16 = 2^4$. This means exactly 4 binary bits (called a "nibble") map to exactly 1 hexadecimal digit. An 8-bit byte ($256$ values) maps cleanly into exactly 2 hex characters ($00$ to $FF$).

Decimal (Base-10) 4-Bit Binary (Base-2) Hexadecimal (Base-16) Power Representation ($8\times b_3 + 4\times b_2 + 2\times b_1 + 1\times b_0$)
0000000
1000111
2001022
7011174 + 2 + 1 = 7
9100198 + 1 = 9
101010A8 + 2 = 10
111011B8 + 2 + 1 = 11
121100C8 + 4 = 12
131101D8 + 4 + 1 = 13
141110E8 + 4 + 2 = 14
151111F8 + 4 + 2 + 1 = 15

Tool-by-Tool Guide to Radix Converters

1. Binary to Hex & Hex to Binary Converters

To convert from binary to hex, group bits into 4-bit nibbles from right to left, then replace each nibble with its corresponding hex digit. The Binary to Hex Converter and Hex to Binary Converter automate this:

  • 1111 1111 $\rightarrow$ FF (255 in decimal)
  • 1010 1100 $\rightarrow$ AC (172 in decimal)
  • 0010 1011 $\rightarrow$ 2B (43 in decimal)

2. Binary to Decimal & Decimal to Binary Converters

The Binary to Decimal Converter and Decimal to Binary Converter calculate standard radix expansions:

$\text{Decimal Value} = \sum_{i=0}^{n} d_i \times 2^i$  |  $\text{Repeated Division by 2 with Remainder}$

For example, to convert decimal 53 to binary: $53/2 = 26\text{ rem }1$, $26/2 = 13\text{ rem }0$, $13/2 = 6\text{ rem }1$, $6/2 = 3\text{ rem }0$, $3/2 = 1\text{ rem }1$, $1/2 = 0\text{ rem }1$. Reading remainders bottom to top gives 110101.

3. Decimal to Hex & Hex to Text Converters

CSS color codes like #3B82F6 (Tailwind blue) are simply three 8-bit hex numbers representing Red (3B = 59), Green (82 = 130), and Blue (F6 = 246). The Decimal to Hex Converter and Hex to Text Converter make inspecting raw bytecode, memory dumps, and color channels intuitive.

Frequently Asked Questions

Why does hexadecimal use the letters A through F?
Because base-16 requires 16 unique single-digit symbols. Decimal only has symbols for 0 through 9 (10 symbols). To represent the numbers 10, 11, 12, 13, 14, and 15 with a single character, computer scientists adopted the English letters A, B, C, D, E, and F.
How many binary bits are in one hexadecimal character?
There are exactly 4 binary bits (one nibble) in every hexadecimal character. Because 2 to the 4th power is 16, any 4-bit binary combination (from 0000 to 1111) maps directly to one hexadecimal symbol (from 0 to F).
What does the "0x" prefix in hexadecimal mean?
The "0x" prefix (e.g., 0xFF or 0x1A4) is a standard programming notation in languages like C, C++, Python, JavaScript, and Java to explicitly instruct the compiler that the following number is written in base-16 hexadecimal rather than base-10 decimal.
How do hex color codes work in web design?
Web hex color codes (like #FF0000) consist of 6 hexadecimal digits divided into three pairs: Red, Green, and Blue (RGB). Each pair is an 8-bit byte ranging from 00 (0 intensity) to FF (255 full intensity). #FF0000 is maximum red with zero green and blue.