BIN$() OCT$() HEX$()

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

Syntax:
BIN$( number [, chars])
OCT$( number [, chars])
HEX$( number [, chars])

Description:

BIN$( number [, chars])
Returns a string giving the binary (base 2) value for the 'number'. 
'chars' is optional and specifies the number of characters in the string with zero as the leading padding character(s).

OCT$( number [, chars])
Returns a string giving the octal (base 8) representation of 'number'. 
'chars' is optional and specifies the number of characters in the string with zero as the leading padding character(s).

HEX$( number [, chars])
Returns a string giving the hexadecimal (base 16) value for the 'number'. 
'chars' is optional and specifies the number of characters in the string with zero as the leading padding character(s).

PRINT BIN$(12345678,32)
PRINT OCT$(12345678,16)
PRINT HEX$(12345678,8)
END


output:
00000000101111000110000101001110
0000000057060516
00BC614E



Last edited: 29 September, 2020