The X2B function returns a sequence of binary digits which corresponds to the given sequence of hexadecimal digits. The returned string has a length which is a multiple of four. Each hexadecimal digit is converted to 4 binary digits.
result = X2B( hexadecimalString ) |
Examples:
say X2B( 'C' ) -- shows: 1100 say X2B( 'C3' ) -- shows: 11000011 say X2B( '007' ) -- shows: 000000000111 say X2B( '2 2BAD' ) -- shows: 001011110010101110101101 say partitionBits( X2B( '2 2BAD' ) ) -- shows: 0010 1111 0010 1011 1010 1101 partitionBits : procedure
|