Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Search and replace in all odd lines

by clinton (Priest)
on Jun 25, 2007 at 14:54 UTC ( [id://623188]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Search and replace in all odd lines
in thread Search and replace in all odd lines

you missed another typo - 2 is binary 10, not 100

To flesh out the reasoning:

DECIMAL BINARY TRUE / FALSE ============= ================= ============ 0 & 2 == 0 000 & 010 == 000 FALSE 1 & 2 == 0 001 & 010 == 000 FALSE 2 & 2 == 2 010 & 010 == 010 TRUE 3 & 2 == 2 011 & 010 == 010 TRUE 4 & 2 == 0 100 & 010 == 000 FALSE 5 & 2 == 0 101 & 010 == 000 FALSE 6 & 2 == 2 110 & 010 == 010 TRUE 7 & 2 == 2 111 & 010 == 010 TRUE

Clint

Replies are listed 'Best First'.
Re^5: Search and replace in all odd lines
by johngg (Canon) on Jun 25, 2007 at 15:02 UTC
    Yes, I've gone bright red :(

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found