diff --git a/src/algorithms/math/bits/countSetBits.js b/src/algorithms/math/bits/countSetBits.js index 63839d4e68..02e85d5d7e 100644 --- a/src/algorithms/math/bits/countSetBits.js +++ b/src/algorithms/math/bits/countSetBits.js @@ -10,8 +10,8 @@ export default function countSetBits(originalNumber) { // Add last bit of the number to the sum of set bits. setBitsCount += number & 1; - // Shift number right by one bit to investigate other bits. - number >>>= 1; + // Arithmetic Shift number right by one bit to investigate other bits. + number >>= 1; } return setBitsCount;