OFF TOPIC mov is Turing complete

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Oct 11 23:19:57 EDT 2016


Completely off-topic, but too awesome not to share:

The x86 assembly language "mov" instruction is Turing complete:

https://www.cl.cam.ac.uk/~sd601/papers/mov.pdf

Abstract
--------
It is well-known that the x86 instruction set is baroque, overcom-
plicated, and redundantly redundant. We show just how much fluff
it has by demonstrating that it remains Turing-complete when re-
duced to just one instruction.

The  instruction  we  choose  is mov,  which can do both loads and stores. We 
use no unusual addressing modes, self-modifying code, or runtime code 
generation. Using just this instruction (and a single unconditional branch at 
the end of the program to make nontermination possible), we demonstrate how an 
arbitrary Turing machine can be simulated.





-- 
Steven
git gets easier once you get the basic idea that branches are homeomorphic 
endofunctors mapping submanifolds of a Hilbert space.




More information about the Python-list mailing list