0
$\begingroup$

I have a question about conversion in number systems . For converting binary to decimal ,why do we need to multiply each of the coefficients by powers of 2 ? And while converting decimal (such as100.12 ) back to binary ,why do we need to multiply the numbers after decimal point by 2 ? And this happens in almost all the conversions . Can somebody please explain me why ? For example 11 in Binary would be equal to 1+2=3(in decimal) But why do we need to raise them to the powers of two ?

$\endgroup$
0
$\begingroup$

The whole thing about having different number systems is having different number of available symbols to express the quantity. The concept of 11 things is not the same in base 3, as it is in base 10, or in base 2.

For your question, I am doing a simple computation below. In base 2, you have only two digits (symbols) available, $\big\{0,1\big\}$, while in decimal system you have 10 digits (symbols) available $\big\{0,1,\cdots,9\big\}$.

Now we write the following correspondence with the decimal numbers on the left side, and the binary numbers on the right.

0$\to$0

1$\to$1

What do we do now? We have more symbols left in the decimal system, but no more symbols in the binary system. The solution is, do exactly as what we do when the symbols run out in decimal system. When we reach 9, we write the first symbol 0 again, but since we already have a number 0, we elevate it by writing the next bigger digit beside it.

The consequence?

We get 10. Now we proceed in the same way as before.

So we get.

2$\to$10

3$\to$11

4$\to$100

5$\to$101

.

.

.

So in base b, we are using b digits, and suppose we have an n-digit number in base b, $a_na_{n-1}a_{n-2}\cdots a_1$. Now let us try to find out how we arrived at this number.

(Please note that all the following calculations have been done in the familiar decimal system that we use.)

Note that we have the symbol $a_n$ in the leftmost place. From the generic rule outlined above, we can see that $a_n$ comes to play only if we have already used up all the symbols occurring before it.

So, for the $n^{th}$ place we have used up all the symbols in $\big\{0,1,\cdots a_n-1\big\}$, which contains $a_n$ symbols. So, we have used up $a_n$ symbols for the $n^{th}$ place.

Now, we move on to the $n-1^{st}$ place, and we check that, in a similar way, we have used up all of the $a_{n-1}$ symbols in $\big\{0,1,\cdots a_{n-1}-1\big\}$. But for each of the symbols $a_i$ in the $n^{th}$ place, we have actually used up all the $b$ symbols in the $n-1^{st}$ place, before we could come to $a_{n-1}$ in the $n-1^{st}$ place for $a_n$ in the $n^{th}$ place.

Thus to reach $a_n$ in the $n^{th}$ place and $a_{n-1}$ in the $n-1^{st}$ place, we have crossed $b\times a_n + a_{n-1}$ numbers before it.

By a similar argument, we reach $a_n$ in the $n^{th}$ place, $a_{n-1}$ in the $n-1^{st}$ place and $a_{n-2}$ in the $n-2^{nd}$ place after crossing $b^2\times a_n + b\times a_{n-1} + a_{n-2}$ numbers before it.

We proceed in the same way, till we have crossed $b^{n-1}\times a_n+ b^{n-2}\times a_{n-1} + \cdots + a_1$.

Thus, to reach $a_na_{n-1}a_{n-2}\cdots a_1$ in base b, we need to cross $b^{n-1}\times a_n+ b^{n-2}\times a_{n-1} + \cdots + a_1$ numbers (calculation in decimal numbers). So it is equivalent to saying that $0+b^{n-1}\times a_n+ b^{n-2}\times a_{n-1} + \cdots + a_1$ in decimal is same as $a_na_{n-1}a_{n-2}\cdots a_1$ in base b.

I hope this answers your question, because b (base) is 2 in the binary system since we use two symbols only, 0 and 1.

$\endgroup$
0
$\begingroup$

For your last Q, a sequence $d_n...d_0$ of $1$'s and $0$'s, in base two, represents the number $2^nd_n+...+2^0d_0.$

$\endgroup$
0
$\begingroup$

That follows immediately from the definition of a "base n number system". The numeral "abcd" in base n means $a\cdot n^3+ b\cdot n^2+ c\cdot n^1+ d\cdot n^0$. (Of course, each of a, b, c, d must be less than n and $n^1= n$ and $n^0= 1$.) In our "usual" base 10 number system "abcd" would be $a\cdot 10^3+ b\cdot 10^2+ c\cdot 10^1+ d\cdot 10^0= a(1000)+ b(100)+ c(10)+ c(1)$. For example, $3215= 3(1000)+ 2(100)+ 1(10)+ 5$.

In base 2, we can use only "0" and "1" as "digits as they are the only positive integers less than 2. $11001= 1(2^4)+ 1(2^3)+ 0(2^2)+ 0(2)+ 1(1) which would be 1(16)+ 1(8)+ 0(4)+ 0(2)+ 1= 25 in base 10.

"Base 16" is also commonly used in computer science because it is a power of 2 (and computer registers are typically 4, 9, or 16 bites long) and results in smaller numerals than base 2. Of course, we also need symbols for the integers 10, 11, 12, 13, 14, and 15 which are also less than 16. The standard is A= 10, B= 11, C= 12, D= 13, E= 14, and F= 15. The numeral A5B3 is the same as $A(16^3)+ 5(16^2)+ B(16)+ 3(1)= 10(4096)+ 5(225)+ 12(16)+ 3= 42280 in base 10.

$\endgroup$

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.