title: How are shifts implemented on the hardware level?
body: <p>How are bit shifts implemented at the hardware level when the number to shift by is unknown?</p>
  
  <p>I can't imagine that there would be a separate circuit for each number you can shift by (that would 64 shift circuits on a 64-bit machine), nor can I imagine that it would be a loop of shifts by one (that would take up to 64 shift cycles on a 64-bit machine). Is it some sort of compromise between the two or is there some clever trick?</p>