You are not logged in. Please login at to post your questions!


how to solve this problem

Can anyone explain with the help of an example

asked 05 Dec '17, 21:47

pandey_96's gravatar image

accept rate: 0%

The question asks for the minimum absolute difference between a number N and a number A, which is actually a power of 2. Since the minimum difference has been asked, it is obvious that A is the closest number to N that is a power of 2. Do not forget that the number A could be either less than, greater than or even equal to N. For example, if N=5, the nearest power of 2 is 4. For N=3, the nearest powers of 2 are 2 and 4. For N=8, the nearest power of 2 is 8 itself. For N=9, the nearest power of 2 is 8.


answered 05 Dec '17, 23:47

shivhek25's gravatar image

accept rate: 0%

First of all, what is your doubt?

you didn't get any idea to solve this question or you don't understand the question?


answered 05 Dec '17, 21:50

hruday968's gravatar image

accept rate: 14%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 05 Dec '17, 21:47

question was seen: 271 times

last updated: 05 Dec '17, 23:47