From 5bde5a8dc109a0e3f8a3e31b7ffb4bd0894bef57 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 29 Nov 2021 22:21:22 +0800 Subject: 2.6 --- 2/6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2/6.c b/2/6.c index 6100cf7..d311002 100644 --- a/2/6.c +++ b/2/6.c @@ -25,7 +25,7 @@ unsigned setbits(unsigned x, int p, int n, unsigned y) { // align extracted bits to p: yLOA = yLO << (p + 1 - n); - // create mask for x + // maks to unset n bits starting at p: xUnset = (~0 << p) | ~(~0 << (p - n)); // mask out n bits in x from pth position: -- cgit v1.2.3