Your Ad Here
String Function
Execute String Function Online
String Functions Online Tool

Convert Binary and Decimal Values

January 15th, 2010

Decimal to Binary conversion is accomplished easily by determining whether the decimal number is odd or even, then successive division by 2, recording the result in binary form.


Convert Decimal to Binary

Try our Decimal to Binary Converter
As an example, the decimal number 153 is odd.

  • The rightmost binary digit – known as the Least Significant Digit or LSD – would be a “1”. If the number had been even, as 152, the LSD would be a “0”. As we record “1″ for the LSD, we now have to divide 152 (153-1)
  • Divide the remainder (152) by 2. If the result is even, record a “0” to the left of the LSD. It is in this example, leaving 76, and the binary string is now “01”.
  • 76 is evenly divided by 2, leaving 38, so record a “0”, the resulting binary string now being “001”.
  • Divide again, resulting in an odd number, 19. Record a 1, subtract the 1 from 19 and result is now “1001.”
  • Divide 18 by 2, resulting in 9. Again, it’s odd, record a 1, subtract the 1 from 9, leaving 8, the binary string is now “11001”.
  • The number 8 is evenly divisible, record a 0, resulting string is now “011001″
  • Divide 4 by 2, leaving 2, which is also even. Resulting string is now “0011001”.
  • Divide the 2 by 2, resulting in 1. Record this as the last and Most Significant Digit. The final result is the binary string “10011001” which is the representation of the decimal number 153.

Convert Binary to Decimal

Try our Binary to Decimal converter
Conversion of binary to decimal values is equally simple.

  • Start at the least significant (rightmost) digit 10011001 is odd, record a 1.
  • The next leftmost bit is the number of 2s, which is none.
  • The next is the number of 4s. Again, none.
  • The next leftmost is the number of 8s. There is one, so record an 8.
  • The next left bit is also a 1, which the number 16s. We now have recorded 1+8+16 so far.
  • The next bit is the number of 32s, none.
  • The next is the number of 64s, again none.
  • The last, most significant digit is the number of 128s. We have 1, record that.
  • Now add the decimal numbers together 1+8+16+128, resulting in the decimal number 153.

These methods are just two of several ways to accomplish the conversion. There are tables and charts which can assist in binary to decimal conversion online, as well as the opposite decimal to binary conversion. The two methods given above have the advantage of being easily done in your head without a tool, since the processes are simple addition and easy division by twos.

VN:F [1.7.0_948]
Rating: +9 (from 9 votes)
Share and Enjoy:
  • Print
  • Add to favorites
  • Twitter
  • Facebook
  • Google Bookmarks
  • Digg
  • Sphinn
  • del.icio.us
  • Mixx
  • Blogplay
  • RSS

One Response to “Convert Binary and Decimal Values”

  1. This post was mentioned on Twitter by @stringfunction. @stringfunction said: RT @stringfunction Convert Binary and Decimal Values – String Function Blog http://is.gd/6iYs3

Leave a Reply