BITS.MAC

BASIC MACROS

BIT

generates n-th bit

DIGIT

generates the n-th digit relative to given base

UND

constructs place summand from digit

 

BIT CONVERSION

BITS3

converts octal digits to bits

BITS4

converts hexadecimal digits to bits

BITS8

converts bytes to bits

BITS16

converts 16-bit integers to bits

BITS32

converts 32-bit integers to bits

UNBITS3

converts bits to octal digits

UNBITS4

converts bits to a hexadecimal digits

UNBITS8

converts bits to bytes

UNBITS16

converts bits to 16-bit integers

UNBITS32

converts bits to 32-bit integers

 

BYTE FOLDING

FOLD168

splits 16-bit integers into bytes

FOLD328

splits 32-bit integers into bytes

FOLD3216

splits 32-bit integers into bytes

UNFOLD816

combines bytes into 16-bit integers

UNFOLD832

combines bytes into 32-bit integers

UNFOLD1632

combines bytes into 32-bit integers

 

BYTE-FLOAT CONVERSION

FLCONVERT

converts 2-byte integer pairs to floating point numbers

 

DECIMAL CONVERSION

DEC8

converts bytes to decimal digits

DEC16

converts 16-bit integers to decimal digits

DEC32

converts 32-bit integers to decimal digits

UNDEC8

converts decimal digits to bytes

UNDEC16

converts decimal digits to 16-bit integers

UNDEC32

converts decimal digits to 32-bit integers

 

HEXADECIMAL CONVERSION

HEX8

converts bytes to hexadecimal digits

HEX16

converts 16-bit integers to hexadecimal digits

HEX32

converts 32-bit integers to hexadecimal digits

UNHEX8

converts hexadecimal digits to bytes

UNHEX16

converts hexadecimal digits to 16-bit integers

UNHEX32

converts hexadecimal digits to 32-bit integers

 

OCTAL CONVERSION

OCT8

converts bytes to octal digits

OCT16

converts 16-bit integers to octal digits

OCT32

converts 32-bit integers to octal digits

UNOCT8

converts octal digits to bytes

UNOCT16

converts octal digits to 16-bit integers

UNOCT32

converts octal digits to 32-bit integers

 

SIGNED-UNSIGNED CONVERSION

SIGN8

converts unsigned 8-bit integer to signed

SIGN16

converts unsigned 16-bit integer to signed

SIGN32

converts unsigned 32-bit integer to signed

UNSIGN8

converts signed 8-bit integer to unsigned

UNSIGN16

converts signed 16-bit integer to unsigned

UNSIGN32

converts signed 32-bit integer to unsigned