Decimal to Binary Converter
Convert to three bases at once.
Result
How it is calculated
The tool accepts one non-negative whole number and rewrites it in three bases. Binary uses the digits 0 and 1, where each position is a power of two: n = bk·2k + … + b1·2 + b0. Hexadecimal groups the bits in fours (digits 0–9 and A–F, shown in capitals), and octal groups them in threes (digits 0–7). All three results describe the same number, so you can check one against another. The input has no unit. Anything that is not a whole number gives no result: negatives, fractions such as 2.5, an empty box, and values above 9,007,199,254,740,991 (253 − 1) are all refused. Leading zeros are not printed, and 0 converts to 0 in every base.
Worked example
Convert 156. The largest power of two that fits is 128, leaving 28; then 16 fits, leaving 12; 8 fits, leaving 4; 4 fits, leaving 0. So 156 = 128 + 16 + 8 + 4, which gives the bits 1 0 0 1 1 1 0 0. The binary result is 10011100. Split into groups of four, 1001 and 1100 are 9 and C, so hex is 9C. Split into groups of three from the right, 010, 011 and 100 are 2, 3 and 4, so octal is 234.
Common mistakes
- Entering a negative number and expecting a two's complement pattern. This converter only handles zero and positive whole numbers; negative input gives no result.
- Typing a fraction such as 10.75. Fractions are not converted, and the tool returns nothing instead of rounding.
- Reading the hex or octal output as a decimal number. 9C and 234 are base 16 and base 8 digit strings, so 234 octal is 156, not two hundred thirty-four.
- Dropping or adding leading zeros when copying into code. The output has none, so pad it yourself if you need a fixed width such as 8 bits.
- Using a number larger than 253 − 1 and expecting an answer. Above that limit the input is rejected.
About this calculator
Computers store and process every value in binary (base 2) — using only the digits 0 and 1 — because a transistor's two stable electrical states map naturally onto two symbols, so converting a familiar base-10 (decimal) number into binary is the fundamental translation between how humans count and how hardware actually represents numbers. The conversion works by repeatedly dividing the decimal number by 2 and reading the remainders in reverse order, or equivalently by finding which powers of 2 sum to the target number.
Hexadecimal (base 16) and octal (base 8) are shown alongside binary because both are compact shorthand for binary that programmers use constantly — each hex digit represents exactly 4 binary bits and each octal digit represents exactly 3, making them far easier to read and write than long strings of 0s and 1s, which is why memory addresses, color codes, and file permissions are conventionally written in hex or octal rather than binary.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments