Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Bitwise operation

Name: Anonymous 2010-06-09 5:28

How are simple operations like adding and subtraction represented using only bitwise operators such as &, |, ^, >>, ~, and <<?

Also, do each of the bitwise operators perform at the same rate, or are some faster than others?

Name: Anonymous 2010-06-09 11:07

>>15
$ php -r 'echo 1 ^ 2, "\n";'
3
$ php -r 'echo "1" ^ "2", "\n";'
"
$ php -r 'echo 1 ^ "2", "\n";'
3
$ php -r 'echo "1" ^ 2, "\n";'
3
$ php -r 'echo "1" ^ "2", "\n";'
"


Heh.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List