title: Converting assembly instructions to hexadecimal format?
body: <p>This is homework, so I'd rather be pushed in the right direction than spoon-fed the answer.</p>
  
  <p>Task: Give binary and hexadecimal encodings for the following instructions</p>
  
  <pre><code>SBC R0, R12, R6
  </code></pre>
  
  <p>Using some instructions from the professor, I've been able to break some of this down into what I think is the correct binary format:</p>
  
  <pre><code>Cond  000  Op    S  Rn    Rd    00000000  Rm
  ----  ---  ----  -  ----  ----  --------  ----
  1110  000  0110  0  1100  0000  00000000  0110
  </code></pre>
  
  <p><strong>Here are my questions:</strong><br>
  1) When is the S flag <code>1</code> rather than <code>0</code>? How can I tell if the flag should be <code>1</code> or <code>0</code> just based on the given Assembly code?</p>
  
  <p>2) How do you determine, with just the Assembly code given, whether it is I-type or R-type?</p>
  
  <p>3) Why are the 3-bit <code>000</code> and 8-bit <code>00000000</code> fields constant?</p>
  
  <p>EDIT: The processor is ARMv7</p>