Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I can not figure this out. I started off by making a table and putting the base(2) on one side, the number in the middle and the remainder in the third row and for 2010 I got 11111011010 but I cant find the next two numbers please help and please explain in detail. Thank you =)

  1. to express 2010 in base 2, we use exactly 8 ones and 3 zeros. find the next two integers in base 2 that use the same number of ones and zeros
share|improve this question
    
Well, express your string in standard base-10, and see how far you are from 2010: 11111011010=0.1+1.2+0.4+...... how far is this from 2010 (i.e., what is the difference between 2010 and your string?).The general method is the same as for decimal expansions.Does that help? –  gary Apr 19 '11 at 23:57
add comment

1 Answer 1

up vote 2 down vote accepted

Just shift the $1$ that is on the far right to the left and will you have the next integer in base 2 with the same number of ones and zeroes. (Think about what it means to shift the one to the left and you'll see why this is the next number)

Edit: An example: lets look at the binary number $101$. The binary base notation means that this number is equal to $1*2^2+0*2^1+1*2^0=5$ in the decimal base notation. So, if we want the next integer with the same numbers of ones and zeros, we would shift the $1$ at the far right one space to the left and we would get $110$, which is $1*2^2+1*2^1+0*2^0=6$ in decimal base. The same logic applies to your case.

To find the other one, you'll have to think a bit, but the process is the same.

share|improve this answer
    
im sorry, im not following. if you move the one over ie (11111011010 becomes 11111011100) how would you figure out which integer creates that? –  user8051 Apr 19 '11 at 23:50
    
No problem. I'll put a small example in the answer. –  Leonardo Fontoura Apr 19 '11 at 23:52
    
ok thank you =) –  user8051 Apr 19 '11 at 23:56
    
There you go, hope this is clearer. –  Leonardo Fontoura Apr 19 '11 at 23:57
    
Yes thank you so much! =D –  user8051 Apr 20 '11 at 0:00
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.