menu
Qamnty
Login
Register
My account
Edit my Profile
Private messages
My favorites
Write a recursive method in pseudo code that returns the number of 1's in the binary representation of n. use the fact that this equal to the number of 1's in the repr…
Ask a Question
Questions
Unanswered
Tags
Ask a Question
Write a recursive method in pseudo code that returns the number of 1's in the binary representation of n. use the fact that this equal to the number of 1's in the repr…
asked
Dec 25, 2019
171k
views
5
votes
Write a recursive method in pseudo code that returns the number of 1's in the binary representation of n. use the fact that this equal to the number of 1's in the representation of n/2, plus 1, if n is odd.
Computers & Tech
college
Natisha
asked
by
Natisha
7.3k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
int count(int num)
if num==0 return 0;
return (n&1)+count (n/2)
Roni Vered
answered
Dec 28, 2019
by
Roni Vered
7.9k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Nov 26, 2019
157k
views
5 write a recursive method that returns the number of 1's in the binary representation of n. use the fact that this is equal to the number of 1's in the representation of n/2, plus 1, if n is odd.
Jeem
asked
Nov 26, 2019
by
Jeem
7.4k
points
Mathematics
college
1
answer
0
votes
157k
views
asked
May 6, 2021
132k
views
Write a recursive method that returns the number of 1’s in the binary representation of N. Use the fact that this is equal to the number of 1’s in the representation of N/2, plus 1, if N is odd
Agentnega
asked
May 6, 2021
by
Agentnega
8.0k
points
Computers & Tech
college
1
answer
2
votes
132k
views
asked
Aug 2, 2020
159k
views
Using pseudo-code, describe a recursive algorithm to find n! mod m, when m, n ? Z+.
Fabio Kenji
asked
Aug 2, 2020
by
Fabio Kenji
7.9k
points
Mathematics
college
1
answer
0
votes
159k
views
Ask a Question
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qamnty