Category Archives: Number Bases

Converting base 10 numbers to base 2

Converting integers to base 2 is reasonably easy.

For example, what is 82 in base 2?

Think about powers of 2

n2^n
01 (‘ones’)
12 (‘tens’)
24 (‘hundreds)
38 (‘thousands’)

Make 82 the sum of powers of 2.

82=64+16+2=1\times 2^6+0\times 2^5+ 1\times 2^4+0\times 2^3+0\times 2^2+1 \times 2^1+0\times 2^0=1010010

We follow the same approach for real numbers

n2^n
-3\frac{1}{8}=0.125
-2\frac{1}{4}=0.25
-1\frac{1}{2}=0.5
01 (‘ones’)
12 (‘tens’)
24 (‘hundreds)
38 (‘thousands’)

Convert 0.765625 to base 2

0.765625\times 2=1.53125 the first number is 1

0.53125\times 2=1.0625 the second number is 1

0.0625\times 2=0.125 the third number is 0

0.125\times 2=0.25 the fourth number is 0

0.25\times 2=0.5 the fifth number is 0

0.5\times 2=1 the sixth number is 1 and we have finished

0.765625=0.110001_2

What about something like 2.\overline{4}?

The non-decimal part 2=10

0.\overline{4}\times 2=0.\overline{8} first number is zero

0\overline{8}\times 2=1.\overline{7} second number is 1

0.\overline{7}\times 2=1.\overline{5} third number is 1

0.\overline{5}\times 2=1.\overline{1} fourth number is 1

0.\overline{1}\times 2=0.\overline{2} fifth number is 0

0.\overline{2}\times 2=0.\overline{4} sixth number is 0

We are back to where we started, so 2.\overline{4}=10.0111000111000..._2=10.\overline{0.11100}_2

Leave a Comment

Filed under Arithmetic, Decimals, Fractions, Number Bases

Divisibility Rule for 11

I was working on a question and involved 11 and I wondered what the divisibility rule was?

So then I had a bit of a think about it.

Let N be a number divisible by 11. The N (mod11)=0

    \begin{equation*}N=a_n\times10^n+a_{n-1}\times10^{n-1}+a_{n-2}\times10^{n-2}+...+a_0\times10^0\end{equation}

    \begin{equation*}0=a_n\times10^n (mod11)+a_{n-1}\times10^{n-1}(mod11)+a_{n-2}\times10^{n-2}(mod11)+...+a_0\times10^0(mod11)\end{equation}

Now 10 (mod11)=10 which is congruent to -1 because 10-(-1)=11, which is a multiple of 11.

Thus

    \begin{equation*}0=a_n(-1)^n+a_{n-1}(-1)^{n-1}+a_{n-2}(-1)^{n-2}+...+a_0(-1)^0\end{equation}

Odd powers will be negative and even positive.

So if we start at one end of the number and add every second digit (i.e. first digit plus third digit plus fifth digit etc.) and then subtract the other digits (i.e. second digit, fourth digit, six digit, etc.), if that equals zero then the number is divisible by 11.

For example, is 1756238 divisible by 11?

1+5+2+8-7-6-3=16-16=0

Hence 1756238 is divisible by 11

Leave a Comment

Filed under Algebra, Arithmetic, Divisibility, Index Laws, Interesting Mathematics, Number Bases

Australian Mathematics Competition – Polynomial Question

I came across this question from the 2010 Senior Australian Mathematics Competition:

A polynomial f is given. All we know about it is that all its coefficients are non-negative integers, f(1)=6 and f(7)=3438. What is the value of f(3)

Australian Mathematics Competition 2006-2012

I thought ‘excellent, a somewhat hard polynomial question for my students’ and then I tried it. Now I know why only 1% of students got it correct.

As we don’t know the order of the polynomial, let

f(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_1x^1+a_0

We know all of the coefficients are greater than or equal to zero. We also know

f(1)=a_n+a_{n-1}+...+a+a_0=6

Which means that all of the coefficients are between zero and six

0\le{a_n}\le{6}

We have also been given f(7)

f(7)=7^na_n+7^{n-1}a_{n-1}+ ... +7a+1=3438

As all of the coefficients are between zero and six, this is 3438 written in base 7.

Let’s calculate a few powers of 7

Powers of 7
7^01
7^17
7^249
7^3343
7^42401
7^516807
As numbersAs Powers of 7
3438=1\times2401+10373438=1\times7^4+1037
1037=3\times343+81037=3\times7^3+8
8=1\times7+18=1\times7^1+1
1=1\times11=1\times7^0

Hence 3438 written in base 7 is 13011

Therefore f(x)=x^4+3x^3+x+1

f(3)=3^4+3\times3^3+3+1

f(3)=81+81+4

f(3)=166

I really like this question. I think it could work well as a class extension activity with a bit of scaffolding.

Leave a Comment

Filed under Number Bases, Polynomials