[BSUM.REC]
[sum two binary numbers]
[[]]
{
[cr,lf] (2573TL;)&
[read phrase] (R13%='';T08%(=2080[sp,bs]TL)(@J|;L@J;);)J
[sign-on line] ('
A Markov Algorithm which will sum two binary
numbers presented in the form a+b=; for example
111110+011=
Each successive keystroke will show another step
in the Algorithm until the final sum is completed
and the auxiliary symbols are gone.
'TL@&'Initial Axiom:'TL@&@JI;:)R
[write workspace] (JZqt;)W
[final statement] (@&'Production:'TL@&JZqt;)X
(@R(@&@WRL
'a0'FD'0a'I:
'a1'FD'1a'I:
'b0'FD'0b'I:
'b1'FD'1b'I:
'0*'FD'1'I:
'1*'FD'*0'I:
'*'FD'1'I:
'0a'FD'=0'I:
'0b'FD'=1'I:
'1a'FD'=1'I:
'1b'FD'*=0'I:
'0+'FD'+a'I:
'1+'FD'+b'I:
'+a'FD'0=+'I:
'+b'FD'1=+'I:
'+'FD''I:
'='FD''I:;;)@X;;)}
[end]