AlgoMaster Logo

Number of 1 Bits

n=11
0 / 11
bit 7bit 6bit 5bit 4bit 3bit 2bit 1bit 000001011Set (1)ClearingJust clearedn = 11 (00001011)count = 0
algomaster.io
Step:Start: n = 11 (00001011). Count the number of 1-bits.