title: testing for equal at bit level using logic gates
body: <p>I am trying to do gate level analysis for an ALU that can handle A==B, so far i have if a-b=0 then a==b.</p>
  
  <p>In binary (we are using 2 bit) i have for <code>1-1</code>, which is <code>01-01</code>. </p>
  
  <p>As this is at gate level i need to do <code>A xor Binverse xor Cin(which is 01 for 2's complement)</code>.</p>
  
  <p>Which equates to <code>01 xor 10 xor 01 = 11 xor 01= 10</code>, but shouldn't I be looking for <code>01-01=00</code>? </p>
  
  <p>any tips on how to test for equal at gate level?</p>