KNOW ME CLOSE
Monday, August 3, 2009
Binary is all about 1 and 0
6 in binary form can be written as 110. Number of 1's in 110 are 2. Let fun(n) be such a function which returns the number of 1's in the binary representation of n. Let Sum(n) = fun(1) + fun(2) + .... + fun(n). Find sum(2147483647)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Alok Ranjan
Gaya, India
View my complete profile
Search This Blog
For them
Labels
Bare Beginnings
(3)
Code it
(8)
TechStuff
(1)
No comments:
Post a Comment