You can use computations to convert binary numbers to hexadecimal, and vice versa. For example, if a user enters a hexadecimal number in an interview, you can use a computation to merge the answer in the assembled document as a binary number.
To convert binary numbers to hexadecimal, the computation begins by adding zeros to the beginning of the binary number until the number of digits is divisible by four. Then, each group of four digits is converted to a hexadecimal number (0–F) and concatenated to the end of the result.
To convert hexadecimal numbers to binary, the computation uses a WHILE loop to look at each digit in the hexadecimal number one at a time. A series of IF instructions then determine whether to append a 1 or 0 to the result, depending on which digit is found in the hexadecimal number. The result of the computation is a binary number with four times as many digits as the hexadecimal number.