Binary Converter
Convert integers among binary, decimal, hexadecimal and octal number systems. Choose the input base, enter a value and see the same integer expressed in all four common bases.
10101052422AHow to use the Binary Converter
- Choose whether the entered value is binary, octal, decimal or hexadecimal.
- Enter a valid whole-number value for that base.
- Binary accepts digits 0 and 1, octal accepts 0 through 7, decimal accepts 0 through 9 and hexadecimal accepts 0 through 9 plus A through F.
- Common 0b and 0x prefixes are accepted.
- The converter parses the integer using exact BigInt arithmetic.
- The same integer is then displayed in binary, octal, decimal and hexadecimal notation.
- Use the Copy button beside any result to copy that representation.
Examples
Binary 101010 to decimal
Binary 101010 equals decimal 42 because its set bits represent 32 + 8 + 2.
Decimal 255 to binary
Decimal 255 equals binary 11111111, octal 377 and hexadecimal FF.
Binary 100000000 to hexadecimal
Binary 100000000 equals decimal 256 and hexadecimal 100.
Hexadecimal FF to binary
Hexadecimal FF equals decimal 255 and binary 11111111.
Frequently asked questions
What is binary?
Binary is a base-2 number system that uses only the digits 0 and 1. Each position represents a power of 2.
How do I convert binary to decimal?
Multiply each binary digit by its corresponding power of 2 and add the results. For example, 1010 equals 8 + 2 = 10.
How do I convert decimal to binary?
Repeatedly divide the decimal number by 2 and record the remainders, then read those remainders in reverse order.
Does this converter support large integers?
Yes. The number-base conversion uses BigInt rather than floating-point arithmetic, which avoids ordinary floating-point rounding for integer conversion.
Can I convert between binary and hexadecimal?
Yes. Select either binary or hexadecimal as the input base and the converter shows both representations along with decimal and octal.
More converters tools
Hex Converter
PopularConvert hexadecimal, decimal, binary and octal integers instantly.
Open tool →Percentage Calculator
PopularCalculate percentages, increases and decreases.
Open tool →Random Number Generator
PopularGenerate a random number within a custom range.
Open tool →Base64 Encoder & Decoder
PopularEncode and decode UTF-8 Base64 and Base64URL text.
Open tool →Unit Converter
PopularConvert length, weight, temperature, area, volume, speed and common metric and imperial units.
Open tool →CM to Inches
PopularConvert centimeters to inches instantly.
Open tool →