Today in chaotic batshit crazy computing: A stack-machine can be implemented in #Fractran, but it's not for the faint of heart.
The theory is that we can keep a stack of zeros and ones in a single register using binary encoding for that number, a little like Church encoding but with bit-shifting.
- Pushing a 0 onto the stack is equivalent to doubling the number.
- Pushing a 1 is equivalent to doubling and adding 1.
- Popping is equivalent to dividing by 2, where the remainder is the value.
This entry was edited (19 hours ago)
Devine Lu Linvega
in reply to Devine Lu Linvega • • •Implementation and examples in Fractran: https://wiki.xxiivv.com/site/fractran.html#stack
abstract machine used in a formal logic and theoretical computer science
Contributors to Wikimedia projects (Wikimedia Foundation, Inc.)xyhhx :PunkFelix:
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to xyhhx :PunkFelix: • • •xyhhx :PunkFelix:
in reply to Devine Lu Linvega • • •