title: how to use inverse in C
body: <p>[how to use ~ operator ]</p>
  
  <p>I have a structure say <code>Alpha</code>.  I know the value of element inside <code>Alpha</code> (say <code>a</code>) which can be <code>0</code> or <code>1</code> - I want the other element of same structure to take inverse value of Alpha.a. For example:</p>
  
  <pre><code>if Alpha.a = 1
  then Alpha.b = 0
  </code></pre>
  
  <p>and vice versa</p>
  
  <p>I have tried:</p>
  
  <pre><code>Alpha.b = ~ (Alpha.a)
  </code></pre>
  
  <p>But unfortunately it doesnt work - when <code>Alpha.a</code> is <code>1</code>, <code>Alpha.b</code> gets set to <code>254</code></p>
  
  <p>Any ideas?</p>
  
  <p>Thanks and regards,</p>
  
  <p>SamPrat</p>