We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

5

From Esolang
Jump to navigation Jump to search
5
Designed by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Appeared in 2024
Memory system Basically Everything
Computational class Turing complete
Major implementations [5]
Dialects 55, 35
File extension(s) .5, .five

5 is an esolang by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff that is based off the simple fact that 5 = 5. Some programming languages such as Forte support this functionality, but 5 dials it up to 55. Every digit 5 is replaced by the digit 5, even in the program counter. It contains an accumulator, however it also has a queue and a control stack.


Commands

Commands
Command What it does do
number set accumulator to number
« digitwise left shift by 5 (decimal)
» digitwise right shift by 5
+ increment accumulator
² square accumulator.
³ cube accumulator
! skip next command if accumulator is 0
? Enqueue the accumulator
- decrement accumulator
{ push the pc on the stack
| pop the stack
} pop the stack and jump to it
~ bitwise not
[ jump to matching ]
* rotate queue left
^ rotate queue right
, count the 5's in the accumulator
; skip next

If the accumulator is less than 0, dequeue the top element and set to the accumulator.

Variants

55

55 is just 5 with I/O and comments

Comments are in parentheses.

comments are removed before executing

`string` prints out string. `` prints a newline

# output number
@ input
$ output char

35

35 is 55 without the 5 = 5 Rule. Backslashes apply the 5 = 5 rule for one instruction.

Programs

Hello, World!

35

`Hello, World!`

Truth-machine

55

;_@{#!}

35

@{#!}

Computation class

You can compile ALWCIDFEC into 5, so 5 is turing complete. Start with ???

Cell-based instructions

+ ::= ~«+?^
* ::= *~«+?*
4 ::= ^~«+?
- ::= ~»?^
/ ::= *~»?*
5 ::= ^~»?

55 & 35

Since 55 and 35 are supersets of 5, they are turing complete as well.

Loops

brackets can be made like this: !;[{code!}|;]

Categories

While 5 has no IO, 55 and 35 do.