Tuesday, February 20, 2007

Converting Binary and Decimal

I found the easiest way to convert the binary number 110010101, was to create the table below where each place has a different power of 2 assigned to it. Then if there is a 1 below a specific power of 2, you find what that power is and place it in the 3rd row of the table. Once you have found all the values of the "1s" in the number, you add those values together and come up with the decimal value of the binary number.

28

27

26

25

24

23

22

21

20

1

1

0

0

1

0

1

0

1

256+

128+



16+


4+


1


256+128+16+4+1 = 405

So the value of the Binary number 110010101 is 405

To convert the Decimal number 529 to its Binary form, all you need to do is divide the number by 2 until you can no longer divide it. Although you don't need to organize it into a table I feel its best to make it look clear and concise. As you can see you start with dividing 529 by 2, which is 264 with a remainder of 1, so the first place in the new binary number is 1. Then you divide 264 by 2, which is 132 with a remainder of 0, so the second place in the new binary number is 0. You do this continuously until you reach zero.

Decimal

Quotient

Remainder

Binary

529

264

1

1

264

132

0

01

132

66

0

001

66

33

0

0001

33

16

1

10001

16

8

0

010001

8

4

0

0010001

4

2

0

00010001

2

1

0

000010001

1

0

1

1000010001


As you can see once you reach 0 and can no longer divide the number by 2, you have the final binary number.

In this case the decimal number 529 is 1000010001 in Binary.

Positional vs. Non-Positional
The difference between Positional and Non-Positional number systems is very simple to understand. A positional number system is one where each position is related to the next by a constant multiplier. For example the decimal systems constant multiplier is 10, so if you find the number 6 in the "hundreds place," it is multiplied by 10^3 or 100.

A non-positional number system does not have a constant multiplier for each position, instead a new symbol is usually created to convey the newest number position. An example of this would be the Roman Numeral System, each position is not related to the one next to it. The number XLI has no constant multplier to tell you that it means 41 in decimal form, you just have to have a specific understanding of what each symbol means.

No comments: