Wednesday, December 5, 2012

Converting into Binary

On September 26th, I learned about binary numbers for the first time. I was like "oh my god, what's these weird numbers". As I looked around the room, it was clear that a sense of confusion had ran across the entire classroom. My classmates all had a puzzled face, a few who understood, and others, who already gave up.  I know the importance of Binary number so when I came back to home, I searched it up on the website and then I finally got some ideas.

Take converting 255 into Binary numbers as an example.

Step 1: Understand the Problem
I looked at it, and understood the problem. It wanted to convert a number in regular base 10 form in a number in base 2 form.

Step 2 :  Devising a Plan
Since I looked at it from an online source, all I had to do was copy the solution posed on for a different number and apply the same formula for the number 255

Step 3 : Carrying out the plan
I solved this problem by doing the following.

-Divide 255 by 2, I get 127, and the remainder is 1
-Divide 127 by 2, get 63 , and the remainder is 1
-Divide 63 by 2, get 31, and the remainder is 1
-Divide 31 by 2, get 15, and the remainder is 1
-Divide 15 by 2, get 7, and the remainder is 1
-Divide 7 by 2, get 3, and the remainder is 1
-Divide 3 by 2, get 1, and the remainder is 1

After doing this, I got the answer by starting from the bottom of the chain
So the answer should be---- 1111111

Step 4 : Looking back
Since I got the answer, I checked the answer by doing the followings.
1*2^0+1*2^1+1*2^2+1*2^3+1*2^4+1*2^5+1*2^6+1*2^7=255

There you go!


No comments:

Post a Comment