title: Converting a int to a BCD byte array
body: <p>I want to convert an int to a byte[2] array using BCD.</p>
  
  <p>The int in question will come from DateTime representing the Year and must be converted to two bytes.</p>
  
  <p>Is there any pre-made function that does this or can you give me a simple way of doing this?</p>
  
  <p><strong>example:</strong></p>
  
  <pre><code>int year = 2010
  </code></pre>
  
  <p>would output:</p>
  
  <pre><code>byte[2]{0x20, 0x10};
  </code></pre>