Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Bit operations for beginners

by Limbic~Region (Chancellor)
on Aug 08, 2003 at 17:19 UTC ( #282265=note: print w/ replies, xml ) Need Help??


in reply to Bit operations for beginners

Cine,
I would also like to see this cleaned up so it could be considered for Tutorials. With that in mind, I have one more nit.

You may be surprised that it is not the "!" operator, which is more known as the "not" operator, but that is because "~" is the "bitwise not" operator.
The "!" operator is used to reverse a true value to false and not actually looking at the specific bits.

I would change 'which is more known as' to 'which is more commonly known as'. I would change 'The "!" operator is used to reverse a true value to false' to 'The "!" operator is used to flip flop the truth of a value from true to false or false to true'.

Cheers - L~R


Comment on Re: Bit operations for beginners
Re: Re: Bit operations for beginners
by mpd (Monk) on Aug 09, 2003 at 02:08 UTC
    Additionally, '~' is more correctly called the (1's) complement operator, or bitwise negation operator, both according to perlop and, by its functionality, mathematics itself. Calling it the 'not' operator is confusing, imo.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-10-02 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (52 votes), past polls