Google search engine
Home How To How to : How to Convert from Decimal to Binary

How to : How to Convert from Decimal to Binary

0
3

[ad_1]

Converter


Decimal to Binary Converter
Method 1
Method 1 of 2:

Performing Short Division by Two with Remainder

  1. Image titled Convert from Decimal to Binary Step 1

    1
    Set up the problem. For this example, let’s convert the decimal number 15610 to binary. Write the decimal number as the dividend inside an upside-down “long division” symbol. Write the base of the destination system (in our case, “2” for binary) as the divisor outside the curve of the division symbol.[2]
  2. Image titled Convert from Decimal to Binary Step 2

    2
    Divide. Write the integer answer (quotient) under the long division symbol, and write the remainder (0 or 1) to the right of the dividend.[3]

  3. Image titled Convert from Decimal to Binary Step 3

    3
    Continue to divide until you reach 0. Continue downwards, dividing each new quotient by two and writing the remainders to the right of each dividend. Stop when the quotient is 0.[4]
  4. Image titled Convert from Decimal to Binary Step 4

    4
    Write out the new, binary number. Starting with the bottom remainder, read the sequence of remainders upwards to the top. For this example, you should have 10011100. This is the binary equivalent of the decimal number 156. Or, written with base subscripts: 15610 = 100111002[5]

Method 2
Method 2 of 2:

Descending Powers of Two and Subtraction

  1. Image titled Convert from Decimal to Binary Step 5

    1
    Start by making a chart. List the powers of two in a “base 2 table” from right to left. Start at 20, evaluating it as “1”. Increment the exponent by one for each power. Make the list up until you’ve reached a number very near the decimal system number you’re starting with. For this example, let’s convert the decimal number 15610 to binary.[6]
  2. Image titled Convert from Decimal to Binary Step 6

    2
    Look for the greatest power of 2. Choose the biggest number that will fit into the number you are converting. 128 is the greatest power of two that will fit into 156, so write a 1 beneath this box in your chart for the leftmost binary digit. Then, subtract 128 from your initial number. You now have 28.[7]
  3. Image titled Convert from Decimal to Binary Step 7

    3
    Move to the next lower power of two. Using your new number (28), move down the chart marking how many times each power of 2 can fit into your dividend. 64 does not go into 28, so write a 0 beneath that box for the next binary digit to the right. Continue until you reach a number that can go into 28.[8]
  4. Image titled Convert from Decimal to Binary Step 8

    4
    Subtract each successive number that can fit, and mark it with a 1. 16 can fit into 28, so you will write a 1 beneath its box and subtract 16 from 28. You now have 12. 8 does go into 12, so write a 1 beneath 8’s box and subtract it from 12. You now have 4.[9]
  5. Image titled Convert from Decimal to Binary Step 9

    5
    Continue until you reach the end of your chart. Remember to mark a 1 beneath each number that does go into your new number, and a 0 beneath those that don’t.[10]
  6. Image titled Convert from Decimal to Binary Step 10

    6
    Write out the binary answer. The number will be exactly the same from left to right as the 1’s and 0’s beneath your chart. You should have 10011100. This is the binary equivalent of the decimal number 156. Or, written with base subscripts: 15610 = 100111002.[11]

Video

By using this service, some information may be shared with YouTube.



Tips

  • Practice. Try converting the decimal numbers 17810, 6310, and 810. The binary equivalents are 101100102, 1111112, and 10002. Try converting 20910, 2510, and 24110 to, respectively, 110100012, 110012, and 111100012.

    ⧼thumbs_response⧽

  • The calculator that comes installed with Windows 10 can do this conversion for you, but as a programmer, you’re better off with a good understanding of how the conversion works. The calculator’s conversion options can be made visible by opening its “View” menu and selecting “Programmer”

    ⧼thumbs_response⧽

  • Converting in the opposite direction, from binary to decimal, is often easier to learn first.

    ⧼thumbs_response⧽

Submit a Tip

All tip submissions are carefully reviewed before being published

Thanks for submitting a tip for review!

You Might Also Like

Convert from Binary to Decimal

Convert from Binary to Decimal

Convert from Decimal to HexadecimalConvert from Decimal to Hexadecimal: A Quick Guide + Examples


Decode Binary Numbers

Decode Binary Numbers

Convert Binary to Octal Number

Convert Binary to Octal Number

Convert Milliliters (mL) to Grams (g)

Convert Milliliters (mL) to Grams (g)

Calculate Volume in Litres

Calculate Volume in Litres

Convert Minutes to HoursConverting Minutes to Hours in Decimal or Hour & Minute Format

Convert Celsius (°C) to Fahrenheit (°F)°C to °F Conversion: A Complete Guide

Convert a Number from Decimal to IEEE 754 Floating Point Representation

Convert a Number from Decimal to IEEE 754 Floating Point Representation

Convert Grams to KilogramsConversion Factor for Grams to Kilograms (and Kilograms to Grams)

Convert Kilometers to Miles

Convert Kilometers to Miles

Convert Feet to Meters

Convert Feet to Meters

Calculate Cubic Inches

Calculate Cubic Inches

Convert Hexadecimal to Binary or Decimal

Convert Hexadecimal to Binary or Decimal

[ad_2]

Source link : https://www.wikihow.com/Convert-from-Decimal-to-Binary