Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re(golf): I'm looking for the faster way to convert char 2 Bin and Bin 2 char (8bits)

by I0 (Priest)
on Jan 27, 2001 at 05:08 UTC ( #54690=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      my $i = 1;
       (push @num, (($num & $i) ? 1 : 0)) and $i<<=1 until $i > $num;
    
  2. or download this
    (push @num, (($num & 1) ? 1 : 0)) and $num>>=1 until 1 > $num;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://54690]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2017-10-20 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (263 votes). Check out past polls.

    Notices?