title: Kotlin `shl` not working
body: <p>I'm attempting to apply <code>shl</code> to an <code>Int</code> value in Kotlin:</p>
  
  <pre><code>val a = 1092455
  println(a.toString())
  println(toString(bits(one)))
  println(toString(bits(one shl 16)))
  println(toString(bits(one shr 16)))
  </code></pre>
  
  <p>This produces the following output:</p>
  
  <pre><code>1092455
  0000000000010000 1010101101100111
  0000000000000000 0000000000000000
  0000000000000000 0000000000010000 
  </code></pre>
  
  <p>As you can see, <code>shr</code> correctly results in the left most 16 bits (<code>0000000000010000</code>) being shifted to the right, however <code>shl</code> does not give the expected output (<code>1010101101100111 0000000000000000</code>).</p>
  
  <p>What am I missing?</p>
  
  <p>Edit: <code>bits</code> method:</p>
  
  <pre><code>fun bits(value: Int): BooleanArray {
      var x = value.toDouble()
      val result = BooleanArray (32)
  
      for (i in 31 downTo 0) {
          val d = Math.pow(2.0, i.toDouble())
          if (x &gt;= d) {
              x -= d
              result[i] = true
          }
      }
  
      return result
  }
  </code></pre>