Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

--Chris

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


Comment on Re: Convert unsigned long int (64bit) to binary string(64bits)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (14)
As of 2015-07-02 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls