I find bits(a) more useful than bin(a). It enables me to see all the bits 
of an integer when experimenting with << and >> to see if I'm doing the 
right thing. eg, set the 2nd bit of a byte:


*julia> **a = 0b00000010*

*0x02*


*julia> **bits(a)*

*"00000010"*


*julia> **a = a | (0x1 << 6)*

*0x42*


*julia> **bits(a)*

*"01000010"*

Reply via email to