Communication between human beings is based on the exchange of opinions, cultures and other relevant aspects, many of these elements are exchanged through tools and codes developed in standardized languages.
In other words, means are used that allow the messages to be transmitted to be understood through codes. In this sense, the numbering systems that are the fundamental basis for the calculation and representation of many functional schemes arise.
Among the number systems you have the binary system that is the basis of machine language, as well as the hexadecimal variant that is a simpler representation of the previous system. In general, it will be very useful for you to know the definition and base of binary numbers, with which you will be able to properly handle the criteria to transform or convert binary numbers to hexadecimal in Excel.
Calculation base to transform a binary number to hexadecimal
Before starting a representation for the transformation of a binary number to hexadecimal, it will be very useful to show the difference between both numbering systems, so that you will have a clear idea of ​​the results that you will obtain once you apply the formula in Excel:
1. Binary number system
It is a numerical representation that bases its calculation on two possibilities, that is, the binary word derives from two possible results, which you can obtain “0” and “1”. As we mentioned before, binary numbers are the basis of machine language, so names and everything we write on a PC or any device is based on these numbers.
With this language you can even write your name. On the other hand, the representation of these numbers to obtain binary from a decimal, it is enough to divide by 2 until obtaining the number “0” or “1” as the remainder.
For example, 14 in decimal to convert it to binary, we must divide by 2 consecutively to obtain the ratio, thus dividing 14 by 2, the quotient is 7 and the remainder is 0, then we divide 7 by 2, the quotient is 3 and the remainder is 1, divide 3 by 2, the quotient is 1 and the remainder is 1. The binary number will be 1110 which is the equivalent of 14 in decimal.
2. Hexadecimal number system
Like the binary to obtain a hexadecimal, the decimal number must be divided, but instead of 2 as the basis of the calculation, the number 16 is used, for this reason the representation changes and a hexadecimal number can take any value up to 15. However, in this case the number 10 is the letter A, 11 is the letter B, 12 is the C, and so on up to 15 which is the letter F.
To obtain the hexadecimal number of a decimal, simply divide a number greater than 16 by 16, so you will obtain the equivalence you need. However, this entry is intended to show how to get a hexadecimal from a binary. To do this you must take 4 consecutive binary numbers to obtain the hexadecimal representation.
Example, the decimal number 18 in binary would be 10010, now in the case of that same decimal to hexadecimal number, we divide by 16 and obtain 12, but as we will do from binary to hexadecimal, then we take from right to left 4 binary numbers and we see its equivalent in hexadecimal. Thus we will have the 0010 which is the number 2 in hexadecimal, leaving only the 1 in binary in the first position that represents the number 1 in hexadecimal.
How to use the function to convert binary to hexadecimal in Excel
Before using Excel to calculate any element, it will be necessary for you to know how to use formulas in Excel, so you must know the syntax to properly write the function and thus obtain a positive and satisfactory result.
- The HEX.A.DEC function will help you to know the decimal value of a number that is represented in Hexadecimal
- You must enter the number in hexadecimal format HEX.A.DEC(number)
- It will return the equivalent of decimal
On the other hand, to transform from binary to hexadecimal you must use BIN.A.HEX, you only have to enter the binary number and it will return the hexadecimal. see microsoft support for more information.