Thursday, February 22, 2007

Binary to Decimal and Decimal to Binary, and the difference between positional and non-positional

Binary to Decimal:
  1. First write out the binary number and then put the power of 2's under that number in ascending order from left to right. For example: the binary number 1001001 on top and have the power of 2's under it like: 2^1, 2^2, ... and so on.
2. Then under every 1 that is in the number calculate what that power of two equals. For example: a 1 has 2^3 under it so it equals 8. Do not do anything to the zeros because they don't matter here.

3. Once you get all of the numbers calculated under the 1's spots add up those numbers to get that total, which equals that number in decimal.

So for the number given in class: 110010101 by doing this process you get 405 in decimal.

Decimal to Binary:
  1. First write down the number in decimal. Next, find a power of 2 that does not exceed the number given in class, 529. For example the value of 2^9= 512 so it fits into your original number without exceeding it.
  2. Once you do that you will get a remainder and you write that down up next to the original number to keep track of it. Next, you want to do the same thing that you did with your original number, find a power of 2 that fits into the remainder that you just got and write that power of 2 under the remainder.
  3. You do this process until you get a remainder of 1, which will make the only power of 2 that will fit into it 2^0, which is 1.
    So the first number in the binary number is 1.
  4. You then skip the power 2^4 since isn't a 1. So you go over past the second, third, and fourth spot. In the fifth place you put a 1. So the number so far would be 10001.
  5. You continue like this for the last power of 2, which is 2^9. And then you go over the same amount of spaces left to right and the final number in binary is 100010001.
Positional Compared to Non-Positional Number Systems:

A non-positional number system is that which does not rely on the position of a digit in a number, but it uses symbols to tell what the values are. For example, if a square stood for ten and a circle stood for one-hundred. If there was a square in front of a circle it would be 110, if the two symbols were switched around and the circle was in front of the square, it would still equal the same number of 110, even though they were switched around.

A positional number system is the same number system that we use everyday. It means that the position of the digits tell the value of the number shown. For example if you had 345, it means three-hundred and forty five. If you were to switch the numbers around to make it look like 543, then the number would be five-hundred and forty three instead, because the position of the digits determines the value of the whole number unlike the symbols in the non-positional number system.

No comments: