Friday, February 23, 2007

Decimal to Binary

You need to take 529 and start dividing it by two, keeping track of the quotient and the remainder.

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

Therefore the binary number for 529 is 1000010001.

No comments: