GeekInterview.com
Series: Subject: Topic:
Question: 121 of 124

How many 1's are there in the binary form of 8*1024 + 3*64 + 3

4

Asked by: Interview Candidate | Asked on: Jun 21st, 2005
Showing Answers 1 - 5 of 5 Answers
srinivas

Answered On : Jan 1st, 2006

how should we get 4

  
Login to rate this answer.
anubhav

Answered On : Aug 2nd, 2006

Actually we first have to multiply then we willl get the ans as 8387 but this ans is in decimal now we willl convert it into binary form. we will get 000011000011 i hope all of you know how to convert decimal to binary so finally ans is 4

  
Login to rate this answer.
priyanka

Answered On : Nov 14th, 2006

i dont see how answer is 4

it should be 8...using the double-dabble simple method of converting decimal to binary by repetedly dividing by 2, we get 1 as remainder 8 times. becoz the result is 8387 in decimal

and 10110011101001 in binary

  
Login to rate this answer.
Manish

Answered On : Jun 24th, 2007

Answer: 5

8*1024=1000*10000000000 Answer will contain 1one's

3*64=11*1000000 Answer will contain 2 one's
3=11
Answer will contain 2 one's

Hence total 5 one's and not 4.

  
Login to rate this answer.
ganita

Answered On : Feb 7th, 2011

View all answers by ganita

Consider the binary representations of all three terms:

(1) 8*1024 = 2^3*2^10 = 2^13 which is 1 followed by 13 zeroes.

(2) 3*64 = 2*64 + 1*64 = 2^7 + 2^6 which is 1 followed by 7 zeros added to 1 followed by six zeroes.

(3) 3 = 2^1 + 2^0 and equals 1 followed by 1 zero added to 1 followed by no zeroes.

Since all the ones have different place values, and none overlap, we do not have any 'carrys', and there is a total of FIVE ONES in the binary representation.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.