Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: bitwise string operator question

by DigitalKitty (Parson)
on Aug 07, 2003 at 14:33 UTC ( #281904=note: print w/ replies, xml ) Need Help??


in reply to bitwise string operator question

Hi all.

Abigail++ (very cool).

Background:

& = bitwise 'and'
| = bitwise 'or'
^ = bitwise 'xor'

The bitwise xor operator only returns '1' when *one* of the operands is different (e.g. 0 ^ 1, 1 ^ 0). If both operands are the same, the result is '0'.

In ACSII, in order to quickly move from uppercase to lowercase (or vice versa), simply add / subtract 32 from the number respectively. The 'space' character, incidentally, has an ASCII value of 32.

Example:
A = 65
a = 97 (65+32 = 97) and (97-32=65).

Hope this helps, Anonymous Monk.
-Katie


Comment on Re: bitwise string operator question

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-12-28 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls