Thursday, June 15, 2006

BITWISE OPERATIONS

#define SET_BIT( _X_, _NO_ ) ( 1<<(_X_-1)) _NO_
#define RESET_BIT( _X_, _NO_ ) ~( ( 1<<(_X_-1) ) ) & _NO_
#define SWAP_BIT( _X_, _NO_ ) ( 1<<(_X_-1)) ^ _NO_

No comments: