Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Working with Binary Numbers

by catellus (Initiate)
on Sep 25, 2007 at 17:25 UTC ( [id://640996]=note: print w/replies, xml ) Need Help??


in reply to Working with Binary Numbers

For a regex solution, which functions a bit recursively even though it's just repetitive:
C:\>perl -p -e"1 while s/^([01 ]*?)([01]*)-([-01]*)([-01 ]*)$/$1${2}0$ +3 ${2}1$3$4/" 000- 0101 011- 1-0- 0000 0001 0101 0110 0111 1000 1001 1100 1101

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found