BitXtoB


The BitXtoB function converts a hexadecimal string representation to a binary string representation.

Syntax

sBinary = BitBtoX( sHex )

bullet.gif    sBinary is the binary string representation of a number.

bullet.gif    sHex is a hexadecimal string representation of a number.

Remarks

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.

Example

The following script converts a binary string representation to a hexadecimal string representation..

sHex = "25"

-- pick a hexadecimal number

sBin = BitXtoB( sHex )

-- convert to binary representation

s = BitTrim( sBin )

-- trim off leading 0's

Printf( "'%s hex --> %s binary'", sHex, s )

-- prints 25 hex --> 100101 binary

Related Topics

Boolean Math Functions

BitBtoX

BitXtoD


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.