Google interview question

Quickly estimate 2^64 without using a pen/papar.

Interview Answers

Anonymous

1 Jul 2011

2 ^ 10 = 1.024 * (10^3) 2 ^ 60 = (1.024 ^ 6) * (10 ^ 18) 2 ^ 64 = (16 * (1.024 ^ 6) * (10 ^ 18) ) All, we need to solve is 1.024 ^ 6. using binomial expansion, ignoring the smaller terms we get : (1 + 0.024) ^ 6 = 1 + 6 * 0.024 = 1.144 = 1.15 (approx) Hence the answer is : (16 * 1.15) * (10 ^ 18) = 18.4 * (10 ^ 18) It is much closer to the actual answer and very fast to calculate.

10

Anonymous

29 Jun 2011

2^10=1024 ~10^3 2^64=(2^10)^6 * 2^4 => (10^3)^6*16 => 10^18*16 => 1.6 * 10 ^ 19 = 16,000,000,000,000,000,000 Calculator says: 18,446,744,073,709,551,616

5

Anonymous

26 Aug 2011

2^32 ~= 4 bil 2^64 = 4bil * 4 bil = 16 bil bil each bil 9 0's, so 16 with 18 0's.

3

Anonymous

9 Jun 2019

well in binary, 1 followed by 64 0s. They didn't specify answer should be in decimal.

1

Anonymous

21 Jun 2012

It is 16 billion billions

1

Anonymous

27 Jun 2011

Well, 2^8 is 256 and 2^16 is that squared, which should have 5 digits.. If I square it again, I should have double those digits, and again if I square it again.. So I'm looking for something in the neighborhood of 1x10^20, or approx 10,000,000,000,000,000,000. Calculator says: 18,446,744,073,709,551,616--> I'm in the ballpark.

1

Anonymous

3 Aug 2011

Donno if this is to test witt and prepness.. I would say 18,446,.... so on He ll ask how i get that.. Say "calculator" The question was about without using pen/paper

Anonymous

12 Jan 2013

They are talking about 64 bit integer, where left most bit is set to 1, and rest to 0. Considering it is 64 bit unsigned integer, it should be equal to value of 32 unsigned integer where all bits are 1, which I guess is somewhere around 4billion, or you can just say 2^64 = UInt32.MaxValue

Anonymous

29 Jan 2016

2^64 the answer is 32