code: function reverseBits(x, bits) {
        var y = 0;
  
        for (var i = 0; i < bits; i++) {
          y = (y << 1) | (x & 1);
          x >>>= 1;
        }
  
        return y;
      }
docs: Returns the integer whose value is the reverse of the lowest 'bits' bits of the integer 'x'.