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
    I’ve taken care of it this time, but you should always make the body of the question self-contained: the reader shouldn’t have to refer to the title for crucial information.2012-10-31
  • 2
    Can you write the number 20 in base 4 and see how many digits it requires?2012-10-31
  • 0
    @BrianM.Scott Thanks for the advice, I will for sure.2012-10-31
  • 0
    @MJD I've edited the question, I believe I've done it correctly, I don't know what base means.2012-10-31
  • 1
    If you don't know what base means, wouldn't it make sense to look back in your notes or in the textbook to see if you could find out before you try to answer the question?2012-10-31
  • 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
    Could you possibly extend this answer? I'm unfamiliar with base notation.2012-10-31
  • 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
    Sorry, I went out, this is very helpful and thank you for taking the time to answer my questions. It makes sense.2012-10-31
  • 0
    Yeah, after some more calculation, this does help a lot.2012-10-31
  • 0
    Are some base calculations impossible? For example finding the base 5 digits of 20?2012-10-31
  • 0
    No, the base-5 digits of 20 are `40` because $20 = 4\cdot5^1 + 0\cdot 5^0$. For any positive $n$ and any base $b\ge 2$, there is always exactly one set of base-$b$ digits of $n$.2012-10-31
  • 0
    Of course, thanks.2012-10-31