GCD Euclidean Algorithm

The Procedure

Real Lab Procedure 

  1. Let "m", "n" be the two positive input numbers. 
  2. Calculate "m % n = r".
  3. Let "m = n and n = r".
  4. Repeat Steps 2 and 3 until "m % n" is greater than 0.
  5. GCD = m.
  6. Finish.

Simulator Procedure

  • Enter the input values.
  • Click on the Submit button.
  • Select the variables from the dropdown list.
  • Click on the Finish button or Start button to view the state diagram.
  • If you have clicked on the Start button then use Next and Previous button to view the State diagram.
  • Click on the Reset button when the State diagram is completed.