English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

2

2007-11-18 12:14:55 · answer #1 · answered by prusa1237 7 · 0 0

2

2007-11-18 12:18:02 · answer #2 · answered by castleon 5 · 0 0

Here's the way you do it by yourself:

For each digit of binary, you write it, from RIGHT TO LEFT, the binary scale, basically (but write it the OTHER WAY AROUND!):

1 2 4 8 16 32 64 128 256 512 1024

For your case

1 0
-------
2 1

For each "1", you add the number you wrote in below. For each "0" above, you ignore the number.

So you get 2.

2007-11-18 12:41:52 · answer #3 · answered by Kasey C 7 · 0 0

you could wreck it down so as that your recurring strategies the utmost maximum set bit and calls itself on each and all of the bits below it. That way it would fulfill the 'recursive' requirement.

2016-11-12 00:57:08 · answer #4 · answered by ? 4 · 0 0

fedest.com, questions and answers