Thursday, February 22, 2007

lab 6 post


Any decimal number can be converted to a binary number by dividing by zero. For this lab, we are given the decimal number 529. We divide it by 2 (hence the name binary) and get 264 with a remainder 1. That 1 is the last digit of the binary conversion of 529. You then divide the answer, 264, by 2 again, getting 132 with a remainder 0. 0 is the second to last digit in the conversion. I keep diving my answer by 2 until i get zero as my answer. The complete binary number is 1000010001.

We can also convert binary numbers to decimal numbers. For this lab, we are given the binary number 110010101. First I wrote all the binary position powers of each digit beginning with the one farthest to the right. it's power is 2 to the 0. the next digit, 0, is 2 to the first power. the numbers increase as i go left. then i convert all the powers. then i multiply the powers by the digit in that place. For example, the first one with the power 2 to the 0, is 1x1 which equals one. the places with zeros can be ignored since zero cancels anything out. I then add the sum of the multiplication together to get my answer. The decimal for of this binary number is 405. hurray.

Positional number systems are systems where the position of the digit is based on a base number. In decimal numbers, for example, the base is a power of ten. the first position is 10 to the 0, the second is 10 to the 1, and so on. Binary numbers follow the positional number form as well. In non-positional number systems, the positions are of no significance. Integers are used to carry the meaning.

No comments: