bin — converts numbers into binary form.
bin (number)
Any number.
An integer number in binary format.
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>
dec, hex, oct
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.