esolang

3 pentits, 25 pentytes

A base-5 computer with 25 cells. The program is 25 characters, and those characters are the memory.

Mutasimos, 2026 · Turing complete: no · ●●○ moderate · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: Hi World

The idea

Mutasimos made this in July 2026, after 2 Bits, 1 Byte and 2 trits, 3 trytes. A pentit is a base-5 digit and a pentyte is three of them, so a cell holds 0 to 124. The specification maps 125 ASCII characters onto those values, lower case a to y being 100 to 144 in base 5. A program is the 25 cells written as characters. Code and data share the memory, so a program prints its own text by pointing at it.

The machine

The low two digits of a cell are its opcode, or an address from 0 to 24. A value argument uses the whole cell. The pointer wraps after cell 24.

OpcodeNameDoes
00DONNothing
01 02 03 04PRT INC DEC FLP addrPrint a cell as its character, add 1, subtract 1, turn each digit d into 4 − d
10JMP addrJump
11 12JIZ JNZ then addrJump if the cell is 0, or is not
13 14 20 21ADD SUB MUL DIV addr valArithmetic modulo 125
22 23 24JLT JGT JEQ then addr valJump if the cell is below, above or equal to val
44ENDStop

The specification leaves opcodes 30 to 43 undefined; in this implementation they do nothing.

Example

b is 101, which is PRT, and r is 132, whose low digits 32 make address 17.

b is 101, which is PRT, and r is 132, whose low digits 32 make address 17. The eight PRTs print cells 17 to 24, and the y (144) after them is END.

Expected: 0
Expected: bacbmjbzyopbbfabyfc.....a

The second is the truth machine. Its input is the last character; 0 prints once and stops, 1 prints 1 forever. The third is a quine. Its first instruction prints cell 0, and the next one adds 1 to that instruction's own address, so the same two cells print the whole memory in turn.

Further

Ideas it shows

Self-modifying

Write your own in Run Convert a program from 3 pentits, 25 pentytes

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: 3-pentits-25-pentytes.

Command line

shib run 3-pentits-25-pentytes -e 'brbsbtbubvbwbxbyyHi World'
shib manual 3-pentits-25-pentytes

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/3-pentits-25-pentytes.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org