index.js
function onescomplement(bin){
  var len = bin.length;
  var onebin = new Array(len);
  for (var i=0; i<len; i++){onebin[i] = !bin[i];}
  return onebin;
}
function onescomplement(bin){
  var len = bin.length;
  var onebin = new Array(len);
  for (var i=0; i<len; i++){onebin[i] = !bin[i];}
  return onebin;
}
function onescomplement ( bin ) { var len = bin . length ; var onebin = new Array ( len ) ; for ( var i = 0 ; i < len ; i ++ ) { onebin [ i ] = ! bin [ i ] ; } return onebin ; }
Computes the one's complement of the binary number
Computes the one s complement of the binary number