title: Why is the dividend 64 bits in x86 assembly?
body: <p>Why does the <code>idiv</code> x86 assembly instruction divide <code>EDX:EAX</code> (64 bits) by a given register whereas other mathematical operations, including multiplication, simply operate on single input and output registers?</p>
  
  <p>Multiplication:</p>
  
  <pre><code>mov eax, 3
  imul eax, 5
  </code></pre>
  
  <p>Division:</p>
  
  <pre><code>mov edx, 0
  mov eax, 15
  mov ebx, 5
  idiv ebx
  </code></pre>
  
  <p>I am aware that <code>EDX</code> is used to store the remainder, but why is there no separate instruction for this behaviour? It just seems inconsistent to me.</p>