-1
$\begingroup$

With base $16$, the digits are denoted as $0, 1,\ldots, 9, A,\ldots, F$. Let $n = AB3$. Rewrite $n$ with bases $10$, $2$.

I have no clue what this question means and how I should attempt to do this.

$\endgroup$
  • $\begingroup$ If you understand radix notation (binary, hexadecimal, decimal) then the Question is rather straightforward. You are being given the hexadecimal presentation of a number, and asked re-present the same number as binary and decimal expressions. $\endgroup$ – hardmath Nov 21 '13 at 14:03
6
$\begingroup$

Hint: a number $n$ in base 10 can be written as follow: $$n=a_i \cdot 10^{i} + a_{i-1} \cdot 10^{i-1} \cdot \dots \cdot a_1 \cdot 10 + a_0 \cdot 10^0 $$ where $a_i \in \{0, 1, \dots, 9\}$. Similar to this case...

$\endgroup$
  • $\begingroup$ So what's i in this? $\endgroup$ – Kasun Jayasuriya Nov 21 '13 at 14:10
  • $\begingroup$ It is the number of the digit, counting from the right and starting with $0$. In base $10$, the $i=2$ digit is the hundreds digit (because we started counting with zero), and the value is $10^2$ $\endgroup$ – Ross Millikan Nov 21 '13 at 14:17
6
$\begingroup$

In base 16, each number is composed of a series of the digits 0-9 and A-F, where, A represents 10, B 11, C 12 and so on up to the maximum for any digit which is F, representing 15.

As such, AB$3$ represents $10$ in the $16^2=256$s column, $11$ in the $16^1=16$s column and 3 in the units column, so in decimal (base 10) that's $10(256)+11(16)+3=2739$.

In general, for a natural number $n$, given a number in base $n$, the digit at the far right tells you how many units, the digit to the left of that how many $n$s, the next digit to the left how many $n^2$s etc. None of the digits in a number in base $n$ is allowed to exceed $n-1$.

For how to convert the number to base 2, see the algorithm presented in Adi Dani's answer.

$\endgroup$
3
$\begingroup$

$$n=(AB3)_{16}=A\cdot16^2+B\cdot 16^1+3\cdot 16^0=10\cdot256+11\cdot16+3\cdot1=2739$$ $$2739:2=1369+1$$ $$1369:2=2\cdot684+1$$ $$684:2=2\cdot342+0$$ $$342:2=2\cdot171+0$$ $$171:2=2\cdot85+1$$ $$85:2=2\cdot42+1$$ $$42:2=2\cdot21+0$$ $$21:2=2\cdot10+1$$ $$10:2=2\cdot5+0$$ $$5:2=2\cdot2+1$$ $$2=2\cdot1+0$$

$$2739=(101010110011)_2$$

$\endgroup$
  • $\begingroup$ I gave you +1 without having checked your base 2 assertion, which is incorrect, but the algorithm is useful, so you deserve the +1. 110011001111 is not 2739 in base 2: it's 3279. $$110011001111=2048+1024+128+64+8+4+2+1=3279$$ The error is in the second line (and hence, as you know, all subsequent lines are inapplicable too), which should be $$1639=684⋅2+1$$ $\endgroup$ – George Tomlinson Nov 22 '13 at 20:43
  • 1
    $\begingroup$ I edit my answer now is correct. I use $1639$ instead of $1369$ Thank you @bluesh34 $\endgroup$ – Adi Dani Nov 22 '13 at 22:34
  • $\begingroup$ No problems. Oh, yeah: I meant 1369. $\endgroup$ – George Tomlinson Nov 25 '13 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.