jacksmack wrote:But I don't understand the following part:

<< ... since we can write 57 = 2^0 + 2^3 + 2^4 + 2^5 >>

if I understand, the statement says that we can write 57 in that binary form, because 57 = 2^0 + 2^3 + 2^4 + 2^5.

But why it says that?

Your repeated division is a quick way to calculate the binary form of any integer, and it corresponds to the fact that 57 = 2^0 + 2^3 + 2^4 + 2^5 = 1 + 8 + 16 + 32

Expressed another way, 57 =

1*2^5 +

1*2^4 +

1*2^3 +

0*2^2 +

0*2^1 +

1*2^0.

That is exactly what it means for a number to have "111001" as its binary representation.

In the same way,

2*10^3 +

0*10^2 +

1*10^1 +

7*10^2 means a number has "2017" as its decimal representation.

Let's take a different number, for example 44

44 = 2(22) + 0, so you know the one's place (2^0) will have a 0 in it. (It's even, so it ends in 0 just like numbers divisible by ten end in 0 in the decimal system.)

22 = 2(11) + 0, so you know the two's place (2^1) will also have a 0 in it. (It's even when you divide by 2, which means the original number is divisible by 4, so it ends in 00 just like numbers divisible by a hundred end in 00 in the decimal system.)

11 = 2(5) + 1, so you know the four's place (2^2) will have a 1 in it. (It's odd when you divide by 4, which means it's not divisible by 8, so it ends in n00 for some n that isn't 0. In the decimal system, this is like how numbers that aren't divisible by 1000 end with two 0's, but not three. In binary, the only n that isn't 0 is 1)

5 = 2(2) + 1, so you know the eight's place (2^3) will have a 1 in it.

2 = 2(1) + 0, so you know the sixteen's place (2^4) will have a 0 in it.

1 = 2(0) + 1, so you know the thirty-two's place (2^5) will have a 1 in it.

This tells you that 44 = 32 + 8 + 4 and has a binary representation of 101100.

Do you understand why the repeated division algorithm tells you about the powers of two you need to add together to make a number?

In binary,

44 = 101100

22 = 10110

11 = 1011

5 = 101

2 = 10

1 = 1

The operations you do in the division algorithm just remove the last binary digit at each step. Noticing whether a number is even or odd is the same as noticing whether it has a 0 or 1 at the end of its binary form.