BitXtoB
The BitXtoB function converts a hexadecimal string representation to a binary string representation.
sBinary = BitBtoX( sHex ) |
The binary and hexadecimal string representations both have the lowest-order bit at the right end of the string. The function does not care whether the string contains leading zeros for the highest order bits that are not set.
The following script converts a binary string representation to a hexadecimal string representation..
|
-- pick a hexadecimal number |
|
-- convert to binary representation |
|
-- trim off leading 0's |
|
-- prints 25 hex --> 100101 binary |