[H-GEN] Conversion of Integer to Binary
Martin Pool
mbp at pharos.com.au
Thu Oct 30 22:02:18 EST 1997
On Fri, 31 Oct 1997, Cameron Reeves wrote:
> There is probably a really easy answer to this, but is there an escape
> sequence that exists that allows an integer value to be printed out in
> binary? I am thinking along the lines of the octal and hex sequences. Is
> there one that exists, or do I have to manually write the code for it?
You can get a good implementation of this function at ftp://204.160.241.98/pub/
System.out.println(Integer.toBinaryString(0xcafebabe)); // ;-)
--
Martin Pool
No, in C you have to write it yourself (AFAIK)
----------------------- HUMBUG General List --------------------------------
echo "unsubscribe general" | mail majordomo at humbug.org.au # To Unsubscribe
More information about the General
mailing list