Skip to content

marta-pylypchuk/codewars-bit-counting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Write a function that takes an Integer as input, and returns the number of bits that are equal to one in the binary representation of that number. You can guarantee that input is non-negative.

Example: the binary representation of 1234 is 10011010010, so the function should return 5 in this case.