Stepwise Progression of the Expanded
Euclidean Algorithm in PHP

HINT: The modulo % operator yields the remainder of division and the quotient is ignored.
HENCE: 5 ÷ 2 = 2.5, but 5 % 2 = 1 {1 remaining after dividing 5 by 2}.                         Refresh this page.

14 random numbers 82 445 436 145 251 277 255 39 400 230 294 360 496 241
multiply by 3 246 1335 1308 435 753 831 765 117 1200 690 882 1080 1488 723
sort from left to right 117 246 435 690 723 753 765 831 882 1080 1200 1308 1335 1488
shift to the right 0 117 246 435 690 723 753 765 831 882 1080 1200 1308 1335
modulo remainder 117 12 189 255 33 30 12 66 51 198 120 108 27 153
sort from left to right 12 12 27 30 33 51 66 108 117 120 153 189 198 255
shift to the right 0 12 12 27 30 33 51 66 108 117 120 153 189 198
modulo remainder 12 0 3 3 3 18 15 42 9 3 33 36 9 57
sort from left to right 3 3 3 3 9 9 12 15 18 33 36 42 57  
shift to the right 0 3 3 3 3 9 9 12 15 18 33 36 42  
modulo remainder 3 0 0 0 0 0 3 3 3 15 3 6 15  
sort from left to right 3 3 3 3 3 6 15 15            
shift to the right 0 3 3 3 3 3 6 15            
modulo remainder 3 0 0 0 0 0 3 0            
sort from left to right 3 3                        
shift to the right 0 3                        
modulo remainder 3 0