Converting from binary to decimal is easier than it seems. The binary system and the decimal system are two types of number systems that are used in different fields. The expression of the same number in each of them is governed by different rules. Therefore, to convert a number from binary to decimal, we must first know how these systems work.
The decimal system
Converting from binary to decimal and vice versa requires an understanding of what is a binary system and what is a decimal system. Let’s start with the simplest and the one we all know: the decimal system.
The decimal system is a method developed by Indian mathematicians, which was later introduced to Europe by the Arabs. It is the method that is used almost everywhere in the world. The set of symbols used in the decimal system consists of ten figures. These figures are zero (0) – one (1) – two (2) – three (3) – four (4) – five (5) – six (6) – seven (7) – eight (8) and nine ( 9). They are used to represent the position of the powers of the number ten.
If we take the number 19,847, each figure represents a value that we must multiply by a power of ten according to its position. We start from right to left, and the first value represents 100, then 101, 102, 103 and so on. The figures allow us to know how many times this power is repeated. For example, in the number 34, we have the first value, 4, which represents that the power 10 is repeated 4 times. Then follows the value 3 which represents that the power 101 is repeated 3 times. Let’s see it more clearly in the following example.
The position of each number represents the power of ten to which it corresponds, and its value how many times this power is repeated. In this way, the decimal system that almost all of us use daily works.
The binary system
The binary system is also a number system that instead of using ten digits it only uses two. Numbers are represented using only the digits zero and one (0 and 1). The binary language, as it is also called, is the one used in computers because it is a language adapted to its operation. Since computers work internally with two voltage levels, off and on, the binary system is ideal for your setup.
If the decimal system works with powers of ten, the binary system uses powers of two as its base. As in the decimal system, the position of the numbers indicates the sum, but in this case of powers of two and not of ten . The binary system works by successively adding the powers of two, and the numbers of 0 and 1 tell us which of these powers we should add and which not. But how do we know what power of two we should add in the binaries? Well, taking into account only the values of the number 1. The 0 indicates that this power has a value of 0 precisely. The 1, for its part, tells us that we must add the value of the power it represents. Let’s see how this method works, taking the binary number 1000011011 as an example.
We start counting from right to left, and we are placing the values 0 and 1 according to the powers of two that we are interested in adding. Once the sum of the powers that have a value of 1 is done, we already know what the value of our binary is.
As in the decimal system, the position of each number tells us what power, in this case of two, it represents. But, unlike the decimal system, the figures (0 or 1) do not tell us how many times this power is repeated, but rather whether that power will have value for the final sum or not. If the number is 1, the power will have its value and will be added. If the figure is 0, the value of the power does not count for the final sum, so its value is 0.
Convert from binary to decimal
In the previous lines we explained the basics of the operation of the binary and decimal systems so that it would be easier to understand the conversion to go from binary to decimal. Let’s observe the following solved exercises, to later explain the process.
If we have the binary number 1000011011 and we want to know what its equivalent is in decimal notation, we must write the powers of two.
From right to left, we start with 2 0 , then 2 1 , 2 2 , 2 3 …and so on. It is important to remember that we start from the right, that is, in the reverse order of the traditional reading. To make the calculation easier, it is advisable to also write the value of each power, that is, 2 0 =1, then 2 1 =2, 2 2 =4, 2 3 =8, etc.
The second step is to write the binary number below, placing each digit in the corresponding value of the power of two. Immediately afterwards, we only add the powers of two that have a value of 1, since the one that has a value of 0 adds up to exactly that, 0.
In this way, we find that the powers that have value 1 in this example are 29, 24, 23,21 and 20. We add the corresponding values of these powers: 512+16+8+2+1 and the result of this sum is the corresponding decimal number. In this case, the binary number 1000011011 is equal to the decimal number 539.