Binary Converter
Convert between number bases.
Input
Result
What is a Binary Converter Calculator?
A Binary Converter converts numbers between four number systems: binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16). It is an essential tool for programmers, computer science students, and electronics engineers who need to switch between number bases when working with memory addresses, color codes, network masks, or low-level data representation.
How to calculate binary conversion manually (the formula)
Decimal to binary: Divide the number by 2, record the remainder, and repeat with the quotient until it reaches 0. Read remainders from bottom to top. Binary to decimal: Multiply each digit (starting from the rightmost at position 0) by 2^position and sum. Decimal to hex: Divide by 16, record remainders (10-15 become A-F), repeat. Binary to hex: Group binary digits into sets of 4 from the right and convert each group to a hex digit.
Example calculation
Convert decimal 42 to binary: 42 ÷ 2 = 21 rem 0, 21 ÷ 2 = 10 rem 1, 10 ÷ 2 = 5 rem 0, 5 ÷ 2 = 2 rem 1, 2 ÷ 2 = 1 rem 0, 1 ÷ 2 = 0 rem 1. Reading bottom to top: 101010. Convert binary 101010 to hex: group as 0010 1010 = 0x2A. To decimal: 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 42.
Common mistakes
- Forgetting positional value starts at 0 — The rightmost binary digit is at position 0 (2&sup0; = 1), not position 1. This off-by-one error causes incorrect totals.
- Confusing hex letter case — Hex digits A-F are case-insensitive, but mixing cases in a single number can cause confusion. Most tools accept both.
- Dropping leading zeros in binary groups — When converting binary to hex, pad groups to 4 bits on the left.
1101is correct;1101(without leading zeros) is fine, but10must become0010.
Frequently asked questions
What is binary conversion?
Binary conversion transforms numbers between base 2 (binary), base 8 (octal), base 10 (decimal), and base 16 (hexadecimal).
How do I convert decimal to binary?
Divide the decimal number by 2 repeatedly and read the remainders from bottom to top.
How do I convert binary to decimal?
Multiply each binary digit by 2 to the power of its position (starting at 0 from the right) and sum the results.
What is hexadecimal used for?
Hex is widely used in programming for memory addresses, color codes, and debugging because it is more compact than binary.
How do I convert hex to decimal?
Multiply each hex digit by 16 to the power of its position and sum, converting A-F to 10-15.
What is the largest value in 8-bit binary?
8 bits hold values from 0 to 255 (11111111 in binary, FF in hex).