Binary-encoded Minsky machine

From Esolang
Jump to navigation Jump to search

Binary-encoded Minsky machine (BMM) is a version of Minsky machine by User:ChuckEsoteric08

Encoding

This version is based on a version of Minsky machine with instructions INC and JZDEC, along with I/O instructions, where INP sets register to ASCII value of input and OUT outputs register as a character. It has an unlimited amount of registers and indexes start at 1. Commands are encoded like this:

Encoding table
Minsky machine Binary-encoded Minsky machine
INC r 110r0
JZDEC r 10r011z0
INP r 101r0
OUT r 0r0

*r (returns value of register r, could not be used as a z in JZDEC) - 0r

r and z should be in unary as a list of 1s, example: 5 -> 11111. If you jump to a nonexisting instruction then the program halts.