We have that MIMA (Neumann MInimal MAchine) has the following commands:
I want to write a MIMA program that takes the value $2^{23}-24=8.388.584$ to the memory cell $y$. We have to take attention at the number of the bits, that we need for the representation of the number in two's complement.
I have done the following:
We have that $2^{n+1}=2\cdot 2^n=2^n+2^n$.
So, $$2^1=2^0+2^0=1+1 \\ 2^2=2^1+2^1=(1+1)+(1+1) \\ 2^3=2^2+2^2=[(1+1)+(1+1)]+[(1+1)+(1+1)] \\ \text{etc} $$
And we have that $24=2^3\cdot 3=2^3+2^3+2^3$.
We initialize the memory cell $y$ with $1$ and we repeat $23$ times to add the value of $y$ by itself and the result we put it at $y$.
Then we have to subtract three times $2^3$.
How do we do this? Do we have to compute again the $2^3$'s, then compute the inverse and add it to the value that is at $y$ ?
But where do we do these operations? To calculate $2^3$ as above, we have to save the results at each step, or not? But where? Do we consider for that an other memory cell?