Read Me - Common Public License V1.0 - Copyright Notice(©)

b2x


>>-b2x---------------------------------------------------------><

Returns a string, in character format, that represents the receiving binary string converted to hexadecimal.

The receiving string is a string of binary (0 or 1) digits. It can be of any length. It can optionally include whitespace characters (at 4-digit boundaries only, not leading or trailing). These are to improve readability and are ignored.

The returned string uses uppercase alphabetic characters for the values A-F and does not include whitespace.

If the receiving binary string is a null string, [b2x] returns a null string. If the number of binary digits in the receiving string is not a multiple of four, up to three 0 digits are added on the left before the conversion to make a total that is a multiple of four.

String class - b2x method


"11000011"~b2x     ->   "C3"
"10111"~b2x        ->   "17"
"101"~b2x          ->   "5"
"1 1111 0000"~b2x  ->   "1F0"

You can combine [b2x] with the methods [x2d] and [x2c] to convert a binary number into other forms.

String class - b2x method with x2d

"10111"~b2x~x2d  ->   "23"   /* decimal 23 */

Read Me - Common Public License V1.0 - Copyright Notice(©)