--- from: http://rosettacode.org/wiki/Bitwise_operations note: Discrete math