Convert between binary, decimal, octal, and hexadecimal number systems with step-by-step math, bit visualization, and IEEE 754 decoding.
Enter a value above to see the positional math for the conversion.
Visual representation of individual bits with their positional values (2n).
See your input value in all four number bases at once.
Paste multiple values (one per line) to convert them all at once.
Enter a decimal number to see its IEEE 754 single-precision (32-bit) and double-precision (64-bit) binary representation.
Click any character to see its code in all number bases. Or type a character below.
Quick reference for values 0 through 255 in all four number bases.
| Decimal | Binary | Octal | Hex | ASCII |
|---|
Binary is a base-2 number system using only two digits: 0 and 1. Every digit position represents a power of 2, starting from 20 on the right. To convert binary to decimal, you multiply each bit by its positional power of 2, then add the products together.
Starting from the right, assign powers of 2:
0 × 20 = 0 × 1 = 01 × 21 = 1 × 2 = 21 × 22 = 1 × 4 = 40 × 23 = 0 × 8 = 01 × 24 = 1 × 16 = 16Sum: 0 + 2 + 4 + 0 + 16 = 22. So binary 10110 equals decimal 22.
To convert decimal to binary, repeatedly divide by 2 and record the remainder. The binary representation is the remainders read from bottom to top. For example, 22 / 2 = 11 R0, 11 / 2 = 5 R1, 5 / 2 = 2 R1, 2 / 2 = 1 R0, 1 / 2 = 0 R1. Reading remainders upward: 10110.
Hexadecimal (base-16) is widely used in programming because each hex digit maps to exactly 4 binary bits. This makes hex a compact way to represent binary data. For instance, the binary value 11111111 is just FF in hex. Octal (base-8) maps 3 binary bits per digit and is used in Unix file permissions (like chmod 755).
Multiply each bit by 2 raised to its position (starting from 0 on the right), then add all the products. For example, binary 1101 = (1×8) + (1×4) + (0×2) + (1×1) = 13.
Divide by 2 repeatedly, recording each remainder. Read the remainders from the last division to the first. For 13: 13/2=6 R1, 6/2=3 R0, 3/2=1 R1, 1/2=0 R1. Result: 1101.
These are positional number systems with different bases. Binary (base-2) uses 0-1 and is the native language of computers. Octal (base-8) uses 0-7 and groups 3 binary bits. Decimal (base-10) uses 0-9 and is standard for everyday math. Hexadecimal (base-16) uses 0-9 plus A-F and groups 4 binary bits, making it popular in programming and memory addresses.
IEEE 754 is the standard for encoding fractional numbers in binary. A 32-bit float has 1 sign bit, 8 exponent bits, and 23 mantissa bits. A 64-bit double has 1 sign bit, 11 exponent bits, and 52 mantissa bits. This format is why 0.1 + 0.2 does not exactly equal 0.3 in most programming languages.
Digital circuits operate with two voltage states: high and low. These two states map directly to the two binary digits (1 and 0). All computation, storage, and transmission in digital electronics is built on this foundation. Higher-level number systems like decimal and hex exist only for human readability.
A bit is a single binary digit (0 or 1), the smallest unit of data. A byte is 8 bits, capable of representing 256 values (0 to 255). Bytes are the standard unit for measuring file sizes and memory. One kilobyte is 1,024 bytes.
The Binary To Decimal Converter is a free browser-based utility designed to save you time and simplify everyday tasks. Whether you are a professional, student, or hobbyist, this tool provides accurate results instantly without the need for downloads, installations, or account sign-ups.
Built by Michael Lip, this tool runs 100% client-side in your browser. No data is ever sent to any server, and nothing is stored or tracked. Your privacy is fully preserved every time you use it.
Quick Facts