位运算
描述 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 #include <stdio.h> #include "bit_ops.h" /* Returns the Nth bit of X. Assumes 0 <= N <= 31. */ unsigned get_bit(unsigned x, unsigned n) { return (x >> n) & 1; /* UPDATE WITH THE CORRECT RETURN VALUE*/ } /* Set the