here's normal, base-1 counting on your fingers. In base 1, you
just raise the number of fingers equal to the value you're trying to
This is funky base-2 counting on your fingers. Each finger represents a
different value now, so you have to start counting with '1' at your
pinky, then '2' with just your ring finger, and '3=2+1' is pinky and
ring finger together. '4' is a single raised middle finger. Then
'5=4+1' is middle finger and pinky, and so on. Just 10 digits actually
allows you to count all the way to 1023, but we'll ignore the thumbs
and just use 8 fingers, to count up to 255=128+64+32+16 (left hand
palm-up, pinky is 16) +8+4+2+1 (right hand palm-down, pinky is 1).
This is actually somewhat useful for counting--try it!
(Note: the numbers four, sixty-four, and especially sixty-eight should not be prominently displayed. Digital binary counting is not recommended in a gang-infested area.)
||Output is inverse of input.
|Building bit masks (~0 is all ones!)
Turning bits backwards.
Computing negative values.
||Output is 1 only if both inputs are 1.
|Zeroing out unwanted parts of an input ("masking").
||Output is 1 if either input is 1.
|Sticking together parts of input data.
||Output is 1if either input is 1, but not both!
|Controlled bitwise inversion: x^y inverts bits of y where x is 1, but leaves them alone where x is 0.