How to convert a binary number to hexadecimal in Excel with the HEX.A.DEC function

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.

That is, 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.

Among the numbering systems you have the binary system that is the basis of machine language, as well as the hexadecimal variant which is a simpler representation of the previous system. In general, it will be very useful to know the definition and base of binary numbers, with which you will get to properly handle the criteria to transform or convert binary numbers to hexadecimal in Excel.

Calculation basis 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, with which you will be clear about the results that you will obtain once you apply the formula in Excel:

1. Binary numbering system

It is a numerical representation that bases its calculation on two possibilities, that is, the word binary derives from two possible outcomes, that you can get the “0” and the “1”. As we named you 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.

stage view of light flashes with binary numbers

With this language you can even write your name. Moreover, the representation of these numbers to get binary from a decimal, just divide by 2 until you get the number “0” or “1” as a remainder.

For example, the 14 in decimal to make it binary, we must divide by 2 consecutively to get the relation, 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, 3 is divided 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 numbering system

Like the binary to get a hexadecimal, the decimal number must be divided, but instead of 2 as the basis of the calculation, the number 16 is used, therefore the representation changes and a hexadecimal number can take any value up to 15. However, in this case number 10 is the letter A, 11 is B, 12 is C, and so on until 15 is the letter F.

To get the hexadecimal number of a decimal just divide a number greater than 16 by 16, so you will get the equivalence you need. However, this post is oriented to show how to obtain a hexadecimal from a binary. To do this you must take 4 consecutive binary numbers to obtain the hexadecimal representation.

spreadsheet view with sample conversion numbers

Example, the decimal number 18 in binary would be 10010Now, in the case of that same decimal to hexadecimal number, we divide by 16 and we obtain 12, but as we will do from binary to hexadecimal, we take 4 binary numbers from right to left and see their equivalent in hexadecimal. Thus we will have 0010, which is the number 2 in hexadecimal, leaving only 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 the 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 to decimal

On the other hand, to transform from binary to hexadecimal you must use BIN.A.HEX, you just have to enter the binary number and it will return the hexadecimal. see microsoft support for more information.

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

Deja un comentario