Google interview question

the binary representation of 4100

Interview Answers

Anonymous

9 Apr 2011

I wonder what the interviewer expected to hear in response. I personally was puzzled for some minutes thinking that i should use some general manual division technique to convert. In real life i just have a calculator. Then i realized that 4100 is 4096 + 4. Given than 4096 is 2^12 and 4 is 2^2 coming up with 100000000100 was easy.

3

Anonymous

25 Mar 2011

100000000100

1