title: Assembly instruction to machine code
body: <p>I'm trying to convert <code>MOVFF 0x10, 0x15</code> to machine code. The  Microcontroller is Microchip PIC 18F1220. The reference manual says:</p>
  
  <pre><code>MOVFF fs,fd
  </code></pre>
  
  <p>Encoding:<br>
  1st word: <code>1100 ffff ffff ffffs</code><br>
  2nd word: <code>1111 ffff ffff ffffd</code></p>
  
  <p>The solution is:  </p>
  
  <pre><code>1100 0000 0010 0000
  1111 0000 0010 0101
  </code></pre>
  
  <p>But the solution I'm getting is</p>
  
  <pre><code>0x10 = 0001 0000
  0x15 = 0001 0101
  1100 0000 0001 0000
  1111 0000 0001 0101
  </code></pre>
  
  <p>Can you please explain me how to get the right answer?</p>
  
  <p>Thank you</p>