<> <> <> <<>> BitHacks: CEDAR DEFINITIONS = BEGIN <> <<-- Predicates>> ODD: PROC [i: INT] RETURNS [BOOL]; EVEN: PROC [i: INT] RETURNS [BOOL]; <<>> <<-- Dealing with Log2 of numbers>> Log2: PROC [n: INT] RETURNS [INT]; -- Floor of Log2 NBits: PUBLIC PROC [n: INT] RETURNS [INT]; TwoToThe: PROC [x: INT] RETURNS [INT]; TwoToTheLog2: PROC [n: INT] RETURNS [INT]; <<>> <<-- Extract the xth bit in the interger N>> <<-- Warning: bit 0 is the LOW order bit (lsb)>> XthBitOfN: PROC [x, n: INT] RETURNS [BOOL]; END.