MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / GrayToBinary

Function GrayToBinary

assets/js/Code_Converter.js:48–58  ·  view source on GitHub ↗
(gray)

Source from the content-addressed store, hash-verified

46}
47
48function GrayToBinary(gray){ //Gray to Binary Function
49let binary='';
50binary+=gray[0];
51for(let i=1;i<gray.length;i++){
52 if(gray[i]=='0')
53 binary+=binary[i-1];
54 else
55 binary+=flip(binary[i-1]);
56}
57return binary;
58}
59
60
61function clear(){ //Clear the input

Callers 1

displayFunction · 0.85

Calls 1

flipFunction · 0.85

Tested by

no test coverage detected