Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Decimal Gray Code in 31 chars

by toolic (Bishop)
on Jan 25, 2010 at 18:05 UTC ( [id://819562]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'print(($_^$_>>1).$/)for(0..pop)' 15
    0
    ...
    11
    9
    8
    
  2. or download this
    perl -e 'printf("%04b$/",($_^$_>>1))for(0..pop)' 15
    0000
    ...
    1011
    1001
    1000
    

Log In?
Username:
Password:

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

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

    No recent polls found