title: How to Increment unsigned int by 1 using bit-shifting & logical opr only?
body: <p>I have a question in my assignment / project that adds 1 to an unsigned integer only using <em>bit-shifting</em> and <em>logical operators</em>. There shouldn't be any "+", "-", "*", or "/" symbols in the function.</p>
  
  <p>I am trying from last days but no success yet. So far I've tried the following:</p>
  
  <pre><code>int A = (((B&amp;C)&lt;&lt;1)^(B^C))
  </code></pre>
  
  <p>Can anybody help me to solve this.? </p>
  
  <p>You can help me in any programming language.</p>