hextobinary(
VALUE
)

The hextobinary( function converts a sequence of hexadecimal digits into a raw binary data value.


Parameters

This function has one parameter:

value – is a text item that contains the hexadecimal number you want to convert.


Description

This function converts a sequence of hexadecimal digits into a raw binary data value. There is no limit on the length of this binary value.

hextobinary("4142434445464748494a4b4c4d4e") ☞ ABCDEFGHIJKLMN

Note: This example converts the hexadecimal string into binary data, which is then automatically converted to text. This works fine for 7-bit ASCII, but will not work properly for 8-bit characters. See the binarytotext( amd texttobinary( functions to learn how to handle conversion of binary data to text using different encoding methods.

Note: This function is similar to the radix( function when used with more than 16 hexadecimal digits. The hextobinary( function, however, will always return a binary value, even if only a single hex digit is supplied (the radix( function will return a numeric value if less than 17 hexadecimal digits are supplied).


Error Messages

hextobinary( function error: input number contains illegal digit. – The input value contains an invalid digit. A valid digit may be 0–9 or A-F or a-f.


See Also


History

VersionStatusNotes
10.0NewNew in this version.