2 Bits, 1 Byte
2 Bits, 1 Byte is an assembly language for a 2-bit CPU, made by User:Gilbert189. With 1 byte of memory, this machine could store at least 2 instructions.
The following are instructions of 2 Bits, 1 Byte:
|01||ACT||ACTion. Given value in memory, change the value according to the following table:
|10||JMP||JuMP. Jump (unconditionally) to address specified.|
|11||END||END. Print the entire memory as character and end the program.|
The instruction pointer can wrap around, thus allowing more "complicated" programs.
Since the memory is one byte, you can represent the entire program with just one character.
which, when disassembled, becomes:
ACT 00b JMP 01b
DON JMP 01b END ; lol
ACT 10b DON ; becomes END
Any digit outputs itself. For example:
Each ASCII digit starts with
0011 in binary, so the first two instructions are