0
$\begingroup$

$n\le 20$. What is the maximum number of digits representing $n$ with base $4$?

This is a question on a sample test that I'm studying for. My prof hasn't gone over it in class, can someone direct me or help me with the procedure to this question?

So to write 20 in base 4 notation would mean (thanks to nikita2) $20=16+4=4^2+4^1=1⋅4^2+1⋅4^1+0⋅4^0$

  • 0
    @MJD I hope it doesn't sound ridiculous, but I believe the knowledge is assumed, and I don't have a strong math background. Thanks for your help though.2012-10-31

2 Answers 2

1

If $n=20$,

$20=16+4 = 4^2 + 4^1= 1\cdot4^2 + 1\cdot4^1 + 0\cdot4^0$

So $20 \sim 110$, and maximum number is $3$.

  • 0
    In our life we use base $10$. It means that every number is $a\cdot10^0+b\cdot10^1+c\cdot10^2$ ... and it is ...cba. For example $396 = 6\cdot10^0 + 9\cdot10^1 + 3\cdot10^2$. Ok MJD did it better.2012-10-31
3

To write an integer $n$ "in base $b$ notation" means to represent it in the form

$d_i\cdot b^i + d_{i-1}\cdot b^{i-1} + \cdots + d_0 \cdot b^0$

where each $d_i$ is an integer less than $b$ and at least 0, except that the first $d_i$ may not be 0. There is guaranteed to be exactly one way to do this. Then we say that the $d_i$ are the "base-$b$ digits of the number $n$".

For example, to write the integer 237 in base 10, we write

$\begin{align} 237 & = 2\cdot 10^2 + 3\cdot 10^1 + 7\cdot 10^0 \\ & = 2\cdot 100 + 3\cdot 10 + 7\cdot 1 \\ & = 200 + 30 + 7\\ & = 237 \end{align}$

and the "base-10 digits of 237" are 2, 3, and 7, as you expect. But we can also ask about the base-8 digits of 237:

$\begin{align} 237 & = 3\cdot 8^2 + 5\cdot 8^1 + 5\cdot 8^0 \\ & = 3\cdot 64 + 5\cdot 8 + 5\cdot 1 \\ & = 192 + 40 + 5 \\ & = 237 \end{align}$

so that "base-8 digits of 237" are 355; we sometimes write that "$237 = 355_8$".

Or the base-2 digits of 237:

$\begin{align} 237 & = 1\cdot 2^7 + 1\cdot 2^6 + 1\cdot 2^5 + 0\cdot 2^4 + 1\cdot 2^3 + 1\cdot 2^2 + 0\cdot 2^1 + 1\cdot 2^0 \\ & = 1\cdot 128 + 1\cdot 64 + 1\cdot 32 + 0\cdot 16 + 1\cdot 8 + 1\cdot 4 + 0\cdot 2 + 1\cdot 1 \\ & = 128 + 64 + 32 + 0 + 8 + 4 + 0 + 1 \\ & = 237 \end{align}$

So the base-2 digits of the number 237 are 11101101; the number requires 8 digits to write in base 2. Notice that because we are writing base-2, the digits must never be bigger than 1, just as in base 10, the conventional system, digits are never bigger than 9.

A larger number never has a shorter base-$b$ representation than a smaller number, so of the numbers from 1 to 20, you need the most digits to write 20 in any base. If you can find how many digits are needed to write 20 in base 4, you have the answer to your question.

Can you make any progress from here?

  • 0
    Of course, thanks.2012-10-31