Advertisement 320 × 50 mobile only · sticky top
Math · Updated 2026
Number Base Converter Instantly convert numbers between binary, octal, decimal and hexadecimal. Pick the source base and enter the value.
Enter the value
BIN (2) OCT (8) DEC (10) HEX (16)
The value is shown in binary, octal, decimal and hexadecimal.
= Decimal (10)
42
Binary (2) 101010
Octal (8) 52
Decimal (10) 42
Hexadecimal (16) 2A
101010 (base 2) = 42 (DEC) = 2A (HEX) Recalculate Add to your site Share Email Print Report an issue Full embed page → Standard mathematical formulas. Instant in-browser calculation, no account. Exact results for the values you enter.
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
i How it is calculated A numeral system has a “base” — how many digits it uses. Binary (base 2) uses 0 and 1, octal (8) digits 0–7, decimal (10) digits 0–9, and hexadecimal (16) digits 0–9 and letters A–F:
decimal_value = Σ digit × base^position
101010 (binary) = 42 (decimal) = 2A (hexadecimal) = 52 (octal).
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
? Frequently asked questions How do I convert a number to binary? Pick base 10 (decimal), enter the number, and the calculator shows it in binary (base 2). For example, 42 in decimal = 101010 in binary.
How do I convert from binary to decimal? Pick base 2 and enter the binary number. The decimal result appears instantly: 101010 (binary) = 42 (decimal).
What is the hexadecimal system? A base-16 system using digits 0–9 and letters A–F (A=10, B=11, …, F=15). It is used for web colors and memory addresses.
How do I convert decimal to hexadecimal? Pick base 10 and enter the number; the hexadecimal result appears in the table. For example, 255 (decimal) = FF (hexadecimal).
What do binary, octal, decimal and hexadecimal mean? They are numeral systems with base 2, 8, 10 and 16. Binary uses only 0 and 1, octal digits 0–7, decimal 0–9, and hexadecimal 0–9 and A–F.
What is 101010 from binary in decimal? 101010 in binary = 42 in decimal (32 + 8 + 2). In hexadecimal it is 2A, and in octal 52.
What is the hexadecimal system used for? Web color codes (e.g. #FF0000 = red), memory addresses, error codes and compact representation of binary data.
How do I convert hexadecimal to binary? Pick base 16 and enter the value; the binary result appears instantly. Each hex digit maps to exactly 4 binary digits (e.g. F = 1111).
Advertisement 728 × 90 320 × 250 desktop 728×90 sticky · mobile 320×250
→ Related tools