Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Convert unsigned long int (64bit) to binary string(64bits)

by taint (Chaplain)
on Dec 13, 2013 at 07:39 UTC ( #1066994=note: print w/ replies, xml ) Need Help??

in reply to Convert unsigned long int (64bit) to binary string(64bits)

I get the same results as hdb.

My Perl is 64bit, and I'm on a *BSD box -- pertinent bits from perl -V: use64bitint=define, use64bitall=define USE_64_BIT_ALL

print unpack( "b64", pack( "Q", 4_294_967_295)), "\n"; print unpack( "b64", pack( "Q", 126_294_967_295)), "\n"; print unpack( "b64", pack( "Q", 4294967295)), "\n"; 1111111111111111111111111111111100000000000000000000000000000000 1111111111000010001000111110011010111000000000000000000000000000 1111111111111111111111111111111100000000000000000000000000000000


EDIT: I might add, it's a 6core AMD CPU (AM2 I think)
Yes. What say about me, is true.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066994]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-07-29 15:31 GMT
Find Nodes?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?

    Results (263 votes). Check out past polls.