Convert the following C-like code, which calculates the maximum difference between any two numbers within an array A consisting of 256 8-bit values, into a high-level state machine.
Inputs: byte a[256], bit goOutputs: byte max_diff, bit doneMAX DIFF:while (1) { while(!go); done = 0; i = 0; max = 0; min = 255; // largest 8-bit value while( i < 256 ) { if ( a [i] < min ) { min = a [i] ; } if ( a [i] > max ) { max a [i]; } i = i + 1; } max diff = max - min; done = 1;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.