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

Re: How to burn 100 megabytes in one line and still get the wrong answer

by tachyon (Chancellor)
on May 14, 2004 at 03:47 UTC ( #353267=note: print w/ replies, xml ) Need Help??


in reply to How to burn 100 megabytes in one line and still get the wrong answer

What is with the 00x ? Perl will be finding the x operator and giving you a string of '0' x BIG_NUM. Does this help?

my $num = 0xffff; my $mask = 0xd0d0; printf " %b (0x%x) %d & %b (0x%x) %d ", $num,$num,$num,$mask,$mask,$mask; print '-' x 31; $num &= $mask; printf " %b (0x%x) %d", $num, $num, $num; __DATA__ 1111111111111111 (0xffff) 65535 & 1101000011010000 (0xd0d0) 53456 ------------------------------- 1101000011010000 (0xd0d0) 53456

cheers

tachyon


Comment on Re: How to burn 100 megabytes in one line and still get the wrong answer
Download Code
Replies are listed 'Best First'.
Re: Re: How to burn 100 megabytes in one line and still get the wrong answer
by zude (Scribe) on May 14, 2004 at 03:51 UTC
    What is with the 00x ?

    Exactly.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2015-07-28 10:23 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 (254 votes), past polls