decomposing a value into powers of two
<p>I need to implement a function which decomposes a value into powers of two using java.</p>

<blockquote>
  <p>e.g: 14= 8 + 4 + 2 </p>
</blockquote>

<p>I need to find the powers of two which the value gets decomposed. For the above example I need  2,3,1 as outputs. How could I implement that?</p>
