Table 2: Core operations list for Miller-Rabin Primality Test.

Step Nr. Operation

1 Clear RAM

2 Write ,

3 Write

4-5,  

6

7

8

9-11,  
,  

12

13 Read , if continue at Step Nr. 3 else continue at Step Nr. 14

14-15,  

16

17-18,  

19

20 Read , if continue at Step Nr. 3 else if stop test with composite else continue at Step Nr. 21

21

22

23-25,  
,  

26

27 Read , if stop test with composite else continue at Step Nr. 28

28-29,  

30

31-32,  

33

34 Read , if and stop test with probably prime else if and continue at Step Nr. 3 else if stop test with composite else continue at Step Nr. 21