This function casts any number to an integer, and returns it in a binary representation. Floating point numbers are truncated.
Gamma> bin(12);
0b1100
Gamma> bin(12.9342);
0b1100
Gamma> bin(0x3b);
0b00111011
Gamma> bin(0o436);
0b000100011110
Gamma>