Radix Converter

Binary, Octal, Decimal, Hexadecimal

Enter a number in any field to convert it to all other bases. Supports positive and negative integers.

Advertisement

About Radix Converter

What is Radix?

In mathematics and computer science, the radix (or base) of a numeral system is the number of unique digits, including zero, used to represent numbers in that system. For example, the decimal system we use every day has a radix of 10 because it uses ten distinct digits: 0 through 9. When we write a number like 425, we are really expressing the value 4 × 10² + 2 × 10¹ + 5 × 10&sup0;.

Different radix values allow the same quantity to be expressed in multiple ways. The number “ten” in decimal is written as 1010 in binary (base 2), 12 in octal (base 8), A in hexadecimal (base 16), and 10 in decimal (base 10). Understanding how these systems relate to one another is essential for anyone working with computers, digital electronics, or low-level programming.

The concept of radix extends beyond these common bases. Base 3 (ternary), base 36, base 64, and many other systems exist for specialized purposes such as data encoding, mathematical research, and compacting large numbers into shorter string representations. Each base has its own trade-offs between readability, compactness, and ease of computation.

Number Systems Explained

There are four number systems that are most commonly encountered in computing and everyday life. Understanding each of them will help you choose the right representation for any task.

Binary (Base 2)

Binary is the fundamental language of computers. It uses only two digits—0 and 1—to represent all data. Every bit in a computer’s memory is a binary digit. Binary is used in low-level programming, bitwise operations, network addressing (subnet masks), file permissions on Unix systems, and digital circuit design. While binary is extremely compact for machines, it is verbose for humans: even a moderately sized number like 255 requires eight binary digits (11111111).

Octal (Base 8)

Octal uses digits 0 through 7. It was historically popular in early computing because three binary digits map neatly to one octal digit, making it a convenient shorthand for reading binary values. Today, octal is most commonly seen in Unix and Linux file permission codes (e.g., chmod 755), where each digit represents read, write, and execute permissions for the owner, group, and others.

Decimal (Base 10)

Decimal is the number system used in everyday life worldwide. It uses ten digits (0–9) and is the default for most human-readable data, currency, measurements, and general-purpose arithmetic. When you see a number without any prefix or context suggesting otherwise, it is safe to assume it is in decimal. Programming languages also default to decimal for integer literals unless a prefix is used.

Hexadecimal (Base 16)

Hexadecimal uses sixteen symbols: 0–9 and A–F (where A = 10, B = 11, …, F = 15). Four binary digits map to one hexadecimal digit, making hex a compact way to represent binary data. It is widely used in programming for memory addresses, color codes in CSS and HTML (e.g., #FF5733), character encoding, assembly language, and debugging. Hex values are typically prefixed with 0x in most programming languages.

How to Use This Tool

This Radix Converter makes it easy to convert numbers between binary, octal, decimal, and hexadecimal instantly. Simply type or paste a number into any one of the four input fields, and the other three fields will update automatically with the equivalent value in the other bases. There is no need to click a button—the conversion happens in real time as you type.

For example, if you enter 255 in the decimal field, the binary field will immediately show11111111, the octal field will show 377, and the hexadecimal field will showFF. You can also start from hexadecimal by entering 1A3, and the converter will display the decimal, binary, and octal equivalents. Each field also has a copy button so you can quickly grab the converted value for use in code, documentation, or other tools.

Frequently Asked Questions

How do I convert binary to decimal manually?

To convert a binary number to decimal, write out each binary digit multiplied by 2 raised to the power of its position (starting from 0 on the right). For example, 1101in binary is 1×2³ + 1×2² + 0×2¹ + 1×2&sup0; = 8 + 4 + 0 + 1 = 13 in decimal. Our tool handles this calculation for you automatically.

Why is hexadecimal used for colors?

Web colors are expressed as hexadecimal triplets like #RRGGBB, where each pair of hex digits represents the intensity of red, green, and blue on a scale from 00 (none) to FF (255, full intensity). This compact representation is easy to parse and aligns naturally with how computers store color data in bytes, making hex the standard format for CSS colors.

Can this converter handle negative numbers?

This tool currently supports positive integers. Negative numbers and floating-point values are not supported because their representation varies across systems (two’s complement, sign-magnitude, IEEE 754, etc.). For most everyday conversion tasks, positive integers cover the majority of use cases including memory addresses, color codes, and permission bits.

When should I use binary vs hexadecimal?

Use binary when you need to examine individual bits—such as when working with bitwise operations, flags, or protocol fields. Use hexadecimal when you need a more compact representation of binary data, such as memory dumps, MAC addresses, or color codes. In practice, developers use hexadecimal far more frequently because it is shorter and easier to read while still mapping directly to binary.

This tool is provided for informational purposes only. KnowKit is not responsible for any errors in the output.