BIN2HEX

Formulas / BIN2HEX
To convert a binary number to its hexadecimal equivalent.
BIN2HEX(number, [places])
  • number - The binary number you want to convert to hexadecimal.
  • [places] - [OPTIONAL] The number of characters to use in the hexadecimal result. If omitted, Sourcetable uses the minimum number of characters necessary.

Examples

  • =BIN2HEX("1010")

    This formula converts the binary number "1010" to its hexadecimal equivalent and returns the result "A."

  • =BIN2HEX("110110`, 4)

    This formula converts the binary number "110110" to its hexadecimal equivalent, using 4 characters in the result, and returns the result "0036."

Summary

BIN2HEX converts a binary number to a hexadecimal number.

  • The BIN2HEX function is a mathematical function that converts a binary number to its hexadecimal equivalent.
  • The BIN2HEX function takes two arguments: the "number" argument representing the binary number to be converted, and the optional "places" argument specifying the number of characters to use in the hexadecimal result.
  • If the binary number provided to BIN2HEX is not valid (i.e., contains characters other than 0 and 1), the function returns a #NUM! error.
  • The BIN2HEX function can handle negative binary numbers and interprets them as two's complement representations.


Frequently Asked Questions

What does the BIN2HEX function do?
The BIN2HEX function converts a binary number to its hexadecimal equivalent. It takes a binary number as input and returns the corresponding hexadecimal value.
What are the arguments of the BIN2HEX function?
The BIN2HEX function has two arguments: "number" and "places." The "number" argument is the binary number to be converted to hexadecimal. The optional "places" argument specifies the number of characters to use in the hexadecimal result. If omitted, Sourcetable uses the minimum number of characters necessary.
What happens if the binary number provided to BIN2HEX is not valid?
If the binary number provided to BIN2HEX is not a valid binary number (i.e., it contains characters other than 0 and 1), the function returns a #NUM! error.
Can BIN2HEX handle negative binary numbers?
Yes, BIN2HEX can handle negative binary numbers. If the most significant bit (leftmost bit) of the binary number is 1, the function treats it as a negative number in two's complement form and converts it to the corresponding negative hexadecimal value.
How can I specify the number of characters in the hexadecimal result?
You can specify the number of characters in the hexadecimal result by using the optional "places" argument in the BIN2HEX function. For example, =BIN2HEX("1010`, 4) will return "000A" with four characters in the result.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code.


Drop CSV