code: function bininputtobin(bininput){
    var len = bininput.length;
    if(len == 0){return filledarray(false, 1);}
    var bin = new Array(len);
    var j = 0;
    for (var i = 0; i < len; i++){
      switch (bininput[i]){
      case '0': bin[j++] = false; break;
      case '1': bin[j++] = true; break;
      default: break;
      }
    }
    return removezeros(bin.slice(0, j));
  }
docs: Computes a binary array out of a binary input string