Number Base Converter - Binary, Octal, Decimal, Hex | TechCalcs
Number base (radix) converter. Convert between binary, octal, decimal, and hexadecimal instantly. Useful for programmers and computer science students.
Convert between binary, octal, decimal, and hexadecimal instantly. Free online number base (radix) converter. Type in any field to convert in real time.
No account needed — sign in with Google or Microsoft in one click.
Sign in to get startedUp to 100 entries · 30-day retention
What Is Number Base Conversion?
Number base conversion (radix conversion) is the process of representing a number in a different base. The most common bases in computing are binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16).
In everyday life, we use the decimal system (base-10), which uses digits 0–9. In computing, however, binary, octal, and hexadecimal are commonly used.
Base System Overview
- Binary (Base-2): Uses only 0 and 1. This is the native language of computers.
- Octal (Base-8): Uses digits 0–7. Useful for representing groups of three binary bits.
- Decimal (Base-10): Uses digits 0–9. The standard number system used in everyday life.
- Hexadecimal (Base-16): Uses digits 0–9 and letters A–F. Widely used to represent four binary bits at a time.
How to Convert Between Number Bases
Decimal to Binary
Repeatedly divide the decimal number by 2 and read the remainders from bottom to top. For example, 13 → 1101 in binary (13÷2=6r1, 6÷2=3r0, 3÷2=1r1, 1÷2=0r1 → read upward: 1101).
Binary to Hexadecimal
Group the binary digits into sets of four from the right, then convert each group to a single hex digit. For example, 11111111 → 1111 1111 → FF.
In programming, hexadecimal is often prefixed with "0x" (e.g., 0xFF) and binary with "0b" (e.g., 0b11111111). This tool accepts the digits only, without prefixes.
Why Binary and Hexadecimal Are Used in Programming
Computers represent data using two electrical states: ON (1) and OFF (0). All internal processing is therefore done in binary.
Why Hexadecimal Is Convenient
While binary is great for bit-level operations, it becomes hard to read when long. Hexadecimal represents exactly 4 binary bits per digit, making it ideal for memory addresses (e.g., 0x7FFF0000), color codes (e.g., #FF5733), and byte sequences.
Octal Use Cases
Octal is still used in contexts where grouping by 3 bits is meaningful, such as Unix/Linux file permissions (e.g., chmod 755).