Binary Converter

Convert between binary, decimal, octal, and hexadecimal number systems with step-by-step explanations and visual bit display.

🔒 Your data stays in your browser

Quick presets

Pro Tips

  • Quick multiply/divide by 2: Left-shift doubles a binary number; right-shift halves it.
  • Check parity: AND a number with 1. If result is 1, it is odd. If 0, it is even.
  • Hex shortcut: Each hex digit maps to exactly 4 binary bits (nibble). F = 1111, A = 1010.
  • Two's complement: To negate a binary number, invert all bits and add 1.
  • XOR swap: You can swap two values using three XOR operations without a temp variable.

Last updated: March 2026

What Is the Binary Converter?

The binary converter is a free tool that translates numbers between the four most common number bases in computing: binary (base 2), decimal (base 10), octal (base 8), and hexadecimal (base 16). Enter a value in any base and see all four representations instantly with step-by-step conversion methods.

Number base conversion is essential in computer science, networking, and software development. Whether you are reading memory addresses in hex, setting Unix file permissions in octal, or debugging bitwise operations in binary, this converter handles it all in one place.

How Number Base Conversion Works

Binary to Decimal: Multiply each bit by its power of 2 and sum the results. For example, 1101 = 8 + 4 + 0 + 1 = 13.

Decimal to Binary: Repeatedly divide by 2 and record remainders. Read remainders from bottom to top. For example, 13 produces remainders 1, 0, 1, 1 = binary 1101.

Binary to Hex: Group bits into 4-bit nibbles from right to left. Each nibble maps to one hex digit: 0000=0, 0001=1, ..., 1010=A, ..., 1111=F.

Binary to Octal: Group bits into 3-bit sets from right to left. Each group maps to one octal digit (0-7).

When You Need Base Conversion

Web development: CSS hex color codes (#FF5733) are hexadecimal values that map to RGB bytes.

Networking: IP addresses and subnet masks are 32-bit binary values often displayed in decimal dotted notation.

Unix permissions: File permissions like 755 or 644 are octal representations of binary permission flags.

Debugging: Memory dumps and register values are typically shown in hexadecimal for compactness.

Frequently Asked Questions

What are the most common number bases in computing?

The four most common bases are: Binary (base 2) used internally by all digital hardware, Decimal (base 10) used by humans, Octal (base 8) used in Unix file permissions and some legacy systems, and Hexadecimal (base 16) used for memory addresses, color codes, and compact binary representation.

How do you convert hexadecimal to binary?

Replace each hex digit with its 4-bit binary equivalent. For example, hex 3F = 0011 1111 in binary. The mappings are: 0=0000, 1=0001, ..., 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. This works because 16 = 2⁴.

How do you convert binary to octal?

Group the binary digits into sets of 3 from right to left, padding with leading zeros if needed. Convert each group to its octal digit (0-7). For example: 110 101 011 = 653 in octal. This works because 8 = 2³.

Why is hexadecimal used in programming?

Hexadecimal is compact — each hex digit represents exactly 4 binary bits, so a byte (8 bits) is always 2 hex digits. This makes hex much more readable than binary for large values. For example, the 32-bit value 11111111000000001010101011111110 is simply FF00AAFE in hex.

What is octal used for?

Octal is most commonly used for Unix/Linux file permissions. Each permission digit (read=4, write=2, execute=1) fits in 3 bits, which maps cleanly to one octal digit. Permission 755 means rwxr-xr-x in binary: 111 101 101.

Related Tools