Bit Tricks ·
x & (x-1) · x & -x · popcount
un
seel
.com · clear lowest bit · isolate lowest bit · Hamming weight
x
12
popcount
2
Trick
—
Bit = 0
Bit = 1
Bit cleared this step
Bit isolated
▶ Play
←
→
🔇 Unmute
Reset
Un
seel
.com · Bit Tricks