Re:One-bit Computing at 60 Hertz
by jonsen on Saturday September 10, 2016 @02:31PM
(#12470349)
First of all the machine should have enough RAM to hold the numbers you want to add.
Say two 3-bit numbers a and b:
Then to do the addition by testing one bit at a time think like
[ Parent
| on HN ]
And how do you store the carry bits (this machine only has 2 bits of state)? Or do you encode carries by pure branching?
It would be tedious to do it all by pure branching. You would need a 64-way branch for c2. If you can't spare one separate RAM bit for a carry you could store the carries in the c2 location and start the computation of c2 by if (c2==...