Today, we are going to talk about numbers, especially binary numbers. We had already had abilities to use numbers even when we were babies; for example, you must had asked your mother for ‘an’ apple , ‘a’ toy or ‘one’ dollar. These words are so normal for everyone that, for a long time, we have never recognize that there is an important and essential mathematic concept behind it. That is number. Sure enough, though we all have known $1,2,3,\dots$ very well, what is a number might never have been thought by us untill we were asked to do that. For we will learn to use binary numbers and decimal numbers simultaneously, during which the concept of number is a key point, we have to go closer to the defination of the number.

From now on, assuming that we know nothing about numbers is necessary to make everything clear, during which even $1,2,3,\dots$ are unknown until they are defined formally and precisely.

When we get something from others, no mater what they are, what we concern most is always how many they are. This question is about quantity, so the figure below can be an answer to our question :

Three rows represent three different things:

□. The row I contains ${\text{apple}}$

○. The row II contains ${\text{apple},\text{apple}}$

△. The row III contains ${\text{apple},\text{apple},\text{apple}}$

To answer the question of how many they are, I have drawn three symbles on the right-hand side of the equations, each of which represent the quantity of things at its row. (However here is a little bug that we have not defined what the equeling is ) So:

□. The quantity, how many the apples are, in row I is **rectangular**

○. The quantity, how many the apples are, in row II is **circle**

△. The quantity, how many the apples are, in row III row is **triangle**

Aha, till now, we have already have defined some numbers, and they are ${□,○,△}$ . Although we have only define △ numbers (the quantity of ${□,○,△}$ is △), but we can use this strategy to define as many numbers as you want. So the light might have already brought you that *the number is just a symbol which gives a certain and unique answer to the quesetion — how many things there are* . Even though we surely have abilities and times to define so many symbles that they can answer whatever the quantity question is, it’s too monotonous and inefficient. According this a new idea came to us, how about use just ** a few symbols** , by whom we can create infinite different combinations. This simple idea gives us sufficient tools and materials to build the conceret and elegant number bulding. Then some great forefathers created ${0,1,2,3,\dots}$. However, I have to admit these symbols are more convenient than my ‘gurgles’(The name of baby play, whose heroes are rectangular, circle, and ect in ‘Good luck Charlie’).

How many symbols we are going to use decides what the number system is. If we use just 2 symbols we get a binary number system, and if we use ten symbols we get a decimal number system.

## Binary numbers

Just as most of human just know decimal numbers, computers only know binary ones( or $2^n$nary ones, like octonary and hexadecimal system) because of their hardware framwork. Binary numbers are expressed as

This may be wired for you if you are not a computer science students. But our all computations on computers, smart phones and e.t.c. are based on binary. Each binary digit is called a bit.

Let’s look some examples, the decimal number 4 can be expressed as $(100.)_2$ in base 2, we can write this in the form:

Translating binary code to the decimal one for us to read is relatively easier than the contrary:

The $2^{n}$ here must be calculated in the decimal system, where $2^2=4, 2^10=1024,\dots$

For example, convert $(10010)_2$ to the decimal number:

The algorithm we wish to discuss next is about how to convert decimal numbers to binary numbers.

## Decimal to Binary

We divid the decimal numbers into two parts, integer and fractional parts. For example,

### Integer Part

We devide the integer part by $2$ successively until the result is 0 and recording the remainders which will always be $0$ or $1$, like $5\div 2 =2 \dots 1$ where the 2 is the result and 1 is the remainder. The successive recorded numbers are starting at the decimal point(radix may be more accurate)

Then the $53.$ in base 10 is equal to $110101.$ in base 2. To check this result, we can ues formular (1) easily:

### Fractional Part

Convert $(0.7)_{10}$ to binary by reversing the preceding steps. Multiply by 2 successively and record the integer parts, and move away the integer parts and then go on:

We can notice that the part which is start from $0.4\times 2$ to $0.2\times 2$ will repeat over and over, so the result must be repeat infinitely. So we write it as:

For this we conclude that

## Binary to Decimal

Formular 1 has told us how to convert binary nunber into the number in base 10, then we use some little tricks to make the fractional part more concise.

There is no doubt in this proccess, but how should the infinite ones be calculated? Suppose $x=(0.\overline{1011})_2$ let’s convert it to decimal:

Another more complicated example, what is $x=(0.10\overline{101})_2$ in decimal form:

first

for

then we set:

use the same method as last example we can get :

then we can get z from the third formular :

then we can get x from the first formular :

## Conclusion

This post we have learned something about binary numbers, how to convert between decimal and binary is the central topic.

## Reference

- Sauer, T., Columbus, B., New, I., San, Y., Upper, F., River, S., … Tokyo, T. (n.d.). Numerical Analysis. Retrieved from http://www.pearsoned.com/legal/permissions.htm.