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

Which bit is set? (inverse of (1<<$value) operator)

by wirito (Acolyte)
on Sep 17, 2012 at 11:04 UTC ( [id://994008]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $bits |= (1<<$val)
    
  2. or download this
    if( unpack( "%16B*", pack("n", $bits)) == 1 ) {
      my $ret = 0;
    ...
      };
      return $ret;
    };
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-28 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found