Register Machines

Register Machine : model of computation.

This system consists of two instructions :

INC_r[t] INCr[t] Increment register r then goto statement t

DEC_r[p,n] DECr[p,n] Decrement register r : if successful goto statement p else goto statement n

Examples

Register Machine Program for Min(x,y) [Minimum of x,y] :

R2=x, R3=y; MIN(x,y) goes in R1

1. DEC2[2,6]
2. DEC3[3,5]
3. INC1[4]
4. INC4[1]
5. INC2[6]
6. DEC4[7,9]
7. INC2[8]
8. INC3[6]
9.
Creative Commons License Valid CSS Valid XHTML 1.0 Driven by DokuWiki Powered by PHP Powered by Apache get firefox!! kgareth.com Recent changes RSS feed