Home / lang / bin 
Bin$
Syntax
String = Bin$ ( Number AS Long [ , Digits AS Integer ] ) AS String

Gets the binary representation of a number.

If Digits is specified, the representation is padded with unnecessary zeros so that Digits digits are returned.

Example
PRINT Bin$(77)

1001101
Example
PRINT Bin$(77, 16)

0000000001001101


See also
Formatting functions