0

I have devised a hypothetical instruction set that I believe is Turing-complete. I cannot think of any computational operation that this instruction set is not able to complete. I would just like to verify that this hypothetical instruction set is indeed Turing-complete.

Registers

IP = Instruction Pointer

FL = Flags

Memory

Von Neumann

Other Info

Instructions have two forms (The conditional/immediate jumps being the outliers):

  • Acting on memory using a scalar
  • Acting on memory using other memory

All instructions act on unsigned integers of a fixed size

Each instruction consists of a one-byte opcode with three trailing one-byte arguments (not all arguments must be used).

Assume a byte is able to hold any memory address

Instructions

Moving = MOV

Basic Arithmetic = ADD, SUB, MUL, DIV, REM

Binary Logic = AND, NOT, OR, NOR, XOR, XNOR, NAND, SHR, SHL

Comparison = CMP (this instruction sets the flags (excluding the unsigned integer overflow flag) by comparing two values)

Conditional Jumps = JMP, various conditional jumps based on the flags

Flags

  • "Unsigned Integer Overflow"
  • ">"
  • "<"
  • ">="
  • "<="
  • "=/="
  • "="
  • Your instruction set is richer than that of a minimal [RASP](https://en.wikipedia.org/wiki/Random-access_stored-program_machine), which can implement a universal Turing machine. You may wish to go through the exercise of building a UTM with your instruction set yourself, which would be the actual proof it's Turing-complete (as opposed to trying to come up with things it *can't* do). – Jeroen Mostert Nov 16 '17 at 12:20
  • Thank you for the information. I am going to make an emulator based on this instruction set, and then attempt to implement a UTM on said emulator to truly verify the Turing-completeness as you suggested. I will share results in an answer when done (which may take a few days/weeks/months). :) – Uncreative Name Nov 16 '17 at 12:38
  • Is it just for exercise purposes or do you have a formal need to prove this Turing-complete? It's actually hard to come up with interesting architectures that *aren't* Turing-complete -- this instruction set is "obviously" Turing-complete as it's richer than known models which are, so about the only reason to actually build a UTM with it is out of academic interest. – Jeroen Mostert Nov 16 '17 at 12:47
  • I wanted to make an emulator but emulating an x86, ARM, MIPS, POWER, etc. instruction set is just overkill for what I want (they are designed for interactive use and come with cruft such as the x86 OUT, INT, PUSH, POP, etc. instructions whereas I just want the emulator to be able take an input in the form of binary code, compute (this is where the turing-completeness requirement comes in), and spit out the answer) – Uncreative Name Nov 16 '17 at 12:57
  • I have two avenues for further research/entertainment: [MIX](https://en.wikipedia.org/wiki/MIX) (and its more modern but also more complicated successor MMIX), which you could consider using in lieu of something home-brewed, and [TIS-100](http://www.zachtronics.com/tis-100/), which is just a good way to frustrate/entertain yourself with Turing tarpits in general (and has a novel computation model). – Jeroen Mostert Nov 16 '17 at 13:04

0 Answers0