diff options
Diffstat (limited to '2')
| -rw-r--r-- | 2/6.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -25,10 +25,10 @@ unsigned setbits(unsigned x, int p, int n, unsigned y) { // align extracted bits to p: yLOA = yLO << (p + 1 - n); - // maks to unset n bits starting at p: + // mask to unset n bits starting at p: xUnset = (~0 << p) | ~(~0 << (p - n)); - // mask out n bits in x from pth position: + // mask out x: xPrime = x & xUnset; return xPrime | yLOA; |
