title: Why were bitwise operations slightly faster than addition/subtraction operations on older microprocessors?
body: <p>I came across this excerpt today:</p>
  
  <blockquote>
    <p>On most older microprocessors, bitwise operations are slightly faster than addition and
    subtraction operations and usually significantly faster than multiplication and division
    operations. On modern architectures, this is not the case: bitwise operations are generally
    the same speed as addition (though still faster than multiplication).</p>
  </blockquote>
  
  <p>I'm curious about why bitwise operations were slightly faster than addition/subtraction operations on older microprocessors.</p>
  
  <p>All I can think of that would cause the latency is that the circuits to implement addition/subtraction depend on several levels of logic gates (parallel adders and whatnot), whereas the bitwise operations have far simpler circuit implementations. Is this the reason?</p>
  
  <p>I know arithmetic and bitwise operations both execute within one clock-cyle on modern processors, but speaking purely about propagation time for the circuit, is the latency still theoretically there in modern processors?</p>
  
  <p>Finally, I had a conceptual C question about the execution of the bitwise shift operation:</p>
  
  <pre><code>unsigned x = 1;
  x &lt;&lt;= 5;
  
  unsigned y = 0;
  y += 32;
  </code></pre>
  
  <p>Both <code>x</code> and <code>y</code> should hold the value <code>32</code>, but did it take <strong>5</strong> separate left shifts to get <code>x</code> to that value (as in are bitwise shifts implemented via pipes)? To clarify, I'm asking purely about the circuit behavior not the number of clock cycles.</p>