# Binary / Decimal / Hex Converter

Convert numbers between binary, decimal, octal, and hexadecimal instantly. Free online number base converter for programmers, students, and engineers.

## What this calculates

Instantly convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). This free converter is essential for programming, computer science, and digital electronics.

## Inputs

- **Input Base** — options: Binary (base 2), Octal (base 8), Decimal (base 10), Hexadecimal (base 16) — The number system of your input.
- **Number to Convert** — The number to convert between bases. For hex, use decimal equivalent.

## Outputs

- **Binary (base 2)** — formatted as text — The number in binary representation.
- **Octal (base 8)** — formatted as text — The number in octal representation.
- **Decimal (base 10)** — formatted as text — The number in decimal representation.
- **Hexadecimal (base 16)** — formatted as text — The number in hexadecimal representation.
- **Binary (grouped)** — formatted as text — Binary with 4-bit grouping for readability.

## Details

Number base conversion is a fundamental skill in computer science and digital electronics. Computers operate in binary (0s and 1s), but humans prefer decimal. Hexadecimal provides a compact representation of binary data.

Base Systems

- Binary (base 2): Uses digits 0 and 1. Each digit is a bit. Eight bits make a byte. Example: 1010 in binary = 10 in decimal.

- Octal (base 8): Uses digits 0-7. Each octal digit represents exactly 3 binary digits. Used in Unix file permissions.

- Decimal (base 10): Our everyday number system using digits 0-9.

- Hexadecimal (base 16): Uses digits 0-9 and letters A-F. Each hex digit represents exactly 4 binary digits (a nibble). Widely used in programming for memory addresses, color codes (#FF5733), and byte values.

Conversion Methods

To convert from any base to decimal, multiply each digit by its positional power of the base and sum the results. To convert from decimal to another base, repeatedly divide by the target base and collect remainders.

## Frequently Asked Questions

**Q: How do I convert decimal to binary?**

A: Repeatedly divide the decimal number by 2 and record the remainders. Read the remainders from bottom to top to get the binary representation. For example, 13: 13/2=6 R1, 6/2=3 R0, 3/2=1 R1, 1/2=0 R1. Reading bottom to top: 1101.

**Q: How do I convert binary to hexadecimal?**

A: Group the binary digits into sets of 4, starting from the right (pad with zeros on the left if needed). Convert each group to its hex equivalent. For example, 11010110 -> 1101 0110 -> D6. This works because 16 = 2^4, so each hex digit corresponds to exactly 4 binary digits.

**Q: Why do programmers use hexadecimal?**

A: Hexadecimal is popular in programming because it compactly represents binary data. One hex digit equals exactly 4 bits, so a byte (8 bits) is always exactly 2 hex digits. Memory addresses, color codes (like #FF0000 for red), and byte values are much more readable in hex than in binary.

**Q: What is the largest number one byte can represent?**

A: One byte is 8 bits. In unsigned representation, it can hold values from 0 to 255 (binary 00000000 to 11111111, hex 00 to FF). In signed representation (two's complement), one byte holds values from -128 to 127.

**Q: What are common uses of binary numbers?**

A: Binary numbers are the foundation of all digital computing. They represent data in computer memory, define logic gate states, encode characters (ASCII/Unicode), represent pixel colors, transmit network data, and store files on disk. Understanding binary is essential for low-level programming, networking, and hardware design.

---

Source: https://vastcalc.com/calculators/technology/binary-converter
Category: Technology
Last updated: 2026-04-21
