title: C# help split two byte word into bytes
body: <p>Hello I am relatively new to C# programming and would appreciate some help, I am writing a program that communicates with a machine via RS232 and need to send a series of bytes to initiate coms. I have a two byte 16bit CRC word at the end of the packet that I think I need to split up into two bytes to fit into an array of bytes</p>
  
  <pre><code>// { &lt;DLE&gt; , &lt;STX&gt; , "G" , &lt;DLE&gt; , &lt;ETX&gt; , 16 BIT CRC CCITT split into two bytes}
  
  byte[] byteToSend = new byte[] { 0x10, 0x02, 0x47, 0x10, 0x03, 0x421F };
  </code></pre>
  
  <p>When I convert 0x421F into binary and split it in half I get 0x42 and 0x1F
  however the problem with the less significant byte 0x1F is when it is sent it is not padded with enough zeroes. I think it is just sent as &lt;11111> instead of &lt;00011111> as is required.</p>
  
  <p>Any help would be MUCH appreciated
  THanks
  :)</p>