5

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

5 is an esolang by User:Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff that is based off the simple fact that 1 = 5. Some programming languages such as Forte support this functionality, but 5 dials it up to 55. Every digit 1 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 1 (decimal)
» digitwise right shift by 1
+ 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

15

15 (or 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 15 without the 1 = 5 Rule. Backslashes apply the 1 = 5 rule for one instruction.

Programs

Hello, World!

35

`Hello, World!`

Truth-machine

15

;_@{#!}

35

@{#!}

Computation class

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

Cell-based instructions

+ ::= «+
* ::= *«+^
4 ::= ^«+*
- ::= »
/ ::= *»^
1 ::= ^»*

15 & 35

Since 15 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, 15 and 35 do.