#define XL 33
#define OR 113
#define NOR 313
#define TN 344
int to_bits(int critn,char *mask)
{
unsigned int x;
*mask = (char)(0x80 >> (x % 8));
The value x is masked so that only the lower three bits remain. The value 0x80 is shifted to right by the remaining number. The result is assigned to the value where mask points to.
return (int)(x >> 3); // fast divide by 8
x is divided by eight. The result is the reutrn value of the method.