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 :(