Bit-Level Parallelism
Reverse(int v) {
int x. r;
for (x=0; x<WIDTH; x++) {
r |= v&1;
v = v >> 1;
r = r << 1;
}
return r;
}
popcount(int v) {
int r=0;
while (v) {
if (v&1) r++;
v = v >> 1;
}
return r;
}
Previous slide
Next slide
Back to first slide
View graphic version