The bin()
function is used to convert an integer number to a binary string (preceded by “0b”). The binary notation is the representation of integers in base 2, the notation only uses the digits 0 and 1 .
The bin()
function takes an integer argument, and returns the corresponding binary representation of the decimal number.
bin(integer)
copy