Reputation: 373
I tried searching for instruction sets of modern CPUs and did not find an answer to the question. I am interested in how modern computers compare to abstractions such as Turing machines (and showing them equivalent), so this is naturally the first question to ask. By modern CPU I mean for example a stock AMD/Intel CPU.
Upvotes: 0
Views: 204
Reputation: 718678
Here is an example of a modern computer instruction set:
(Or at least, that is a summary. For a complete description, look at the Intel or AMD manuals (links in the x86 tag wiki), or HTML extracts like https://www.felixcloutier.com/x86/.)
And, yes, if you compile a C++ program for an x86 CPU, you will get native machine instructions. Matt Godbolt's CppCon2017 talk “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid” might be a good introduction.
A Turing Machine is not and never has been a practical computer, and it doesn't have an instruction set. So comparing instruction sets doesn't make sense. (It is possible implement a physical Turing Machine, but given the way that they work, it would have no practical use as a computation device.)
You could prove that a modern computer is "Turing complete" is by creating a Turing machine emulator. You would probably write it in a high level language and compile it and run it on the hardware of your choice. Doing this is the proof.
But in practice nobody would bother because it is rather tedious ... and it has been done before. (If you want to find an example, Google for "turing machine simulator".)
Upvotes: 2