Binary Numbers

Keywords: binary numbers

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,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,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 {apple}\{\text{apple}\}
○. The row II contains {apple,apple}\{\text{apple},\text{apple}\}
△. The row III contains {apple,apple,apple}\{\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,}\{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 2n2^nnary ones, like octonary and hexadecimal system) because of their hardware framwork. Binary numbers are expressed as

b2b1b0.b1b2 where bi{0,1}\dots b_2b_1b_0.b_{-1}b_{-2}\dots \text{ where } b_i\in\{0,1\}

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(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:

n10=b222+b121+b020+b121+b222+(1)n_{10}=\dots b_2 2^{2}+b_1 2^{1}+b_0 2^{0}+b_{-1} 2^{-1}+b_{-2} 2^{-2}+\dots \tag{1}

The 2n2^{n} here must be calculated in the decimal system, where 22=4,210=1024,2^2=4, 2^10=1024,\dots
For example, convert (10010)2(10010)_2 to the decimal number:

1×24+0×23+0×22+1×21+0×20=1610+010+010+210+010=18101\times 2^4 + 0\times 2^3 + 0\times 2^2 + 1\times 2^1 + 0\times 2^0=16_{10}+0_{10}+0_{10}+2_{10}+0_{10}=18_{10}

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 22 successively until the result is 0 and recording the remainders which will always be 00 or 11, like 5÷2=215\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)

53÷2=26126÷2=13013÷2=616÷2=303÷2=111÷2=01\begin{aligned} 53\div 2&=26 &\dots 1\\ 26\div 2&=13 &\dots 0\\ 13\div 2&=6 &\dots 1\\ 6\div 2&=3 &\dots 0\\ 3\div 2&=1 &\dots 1\\ 1\div 2&=0 &\dots 1\\ \end{aligned}

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

1×25+1×24+0×23+1×22+0×21+1×20=531\times 2^5+1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0=53

Fractional Part

Convert (0.7)10(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:

0.7×2=0.4+10.4×2=0.8+00.8×2=0.6+10.6×2=0.2+10.2×2=0.4+00.4×2=0.8+00.8×2=0.6+10.6×2=0.2+10.2×2=0.4+0\begin{aligned} 0.7\times 2&=0.4 &+ 1\\ 0.4\times 2&=0.8 &+ 0\\ 0.8\times 2&=0.6 &+ 1\\ 0.6\times 2&=0.2 &+ 1\\ 0.2\times 2&=0.4 &+ 0\\ 0.4\times 2&=0.8 &+ 0\\ 0.8\times 2&=0.6 &+ 1\\ 0.6\times 2&=0.2 &+ 1\\ 0.2\times 2&=0.4 &+ 0\\ &\vdots& \end{aligned}

We can notice that the part which is start from 0.4×20.4\times 2 to 0.2×20.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.1011)2x=(0.\overline{1011})_2 let’s convert it to decimal:

x=0.101124x=1011.101124xx=1011.10110.1011(161)10x=10112=1110x=(1115)10\begin{aligned} x&=0.\overline{1011}\\ 2^4x &=1011. \overline{1011}\\ 2^4x -x&=1011. \overline{1011}-0.\overline{1011}\\ (16-1)_{10}x&=1011_{2}=11_{10}\\ x&=(\frac{11}{15})_{10} \end{aligned}

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




then we set:


use the same method as last example we can get :

(231)y10=1012=510y10=(57)10(2^3-1)y_{10}=101_2=5_{10}\\ y_{10}=(\frac{5}{7})_{10}

then we can get z from the third formular :


then we can get x from the first formular :

x=z10÷4=1928x=z_{10}\div 4=\frac{19}{28}


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


  1. Sauer, T., Columbus, B., New, I., San, Y., Upper, F., River, S., … Tokyo, T. (n.d.). Numerical Analysis. Retrieved from