title: How to convert UInt16 to an array of bits
body: <p>I am trying to convert UInt16 to an array of bits, where do I start?</p>
  
  <p>I need to convert the UInt16 to an array so I can shift bits. For example 1110 shifted to the right by 2 equals 1011, or if i do </p>
  
  <pre><code>var i: UInt16 = 5
  i = i &gt;&gt; 3
  </code></pre>
  
  <p>it will return 0, however I want it to return 40960. In binary this will look like </p>
  
  <pre><code>0000000000000101 &gt;&gt; 3 = 1010000000000000 (40960)
  </code></pre>
  
  <p>I do not know where to start with this problem, so any help is appreciated</p>