Name
BinStr -- convert value to a binary formatted string (V2.0)
Synopsis
bin$ = BinStr(val[, length])
Function
This function converts the value specified by val into binary format (base 2) and returns it as a string. The optional argument length allows you to specify how many bits shall be put into the string. This can be #INTEGER for 32 bits, #SHORT for 16 bits, and #BYTE for 8 bits. By default, #INTEGER will be used.

Inputs
val
value to convert
length
optional: how many bits shall be converted (must be #INTEGER, #SHORT, or #BYTE) (V3.0)
Results
bin$
binary notation of val
Example
a$ = BinStr(255, #BYTE)
This returns the string "11111111".

Show TOC