Bit Twiddling Hacks
graphics.stanford.edu