Bit Manipulation - Number of 1 Bits (Hamming Weight)
Suppose the input integer can be negative and you want to count the number of 1 bits in its 32-bit two's complement representation. Which modification ensures correct counting for all integers?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions