cirbe

From Esolang
Jump to navigation Jump to search

cirbe is an esolang that uses the following 16 unicode characters:

 ╺╹┗╸━┛┻╻┏┃┣┓┳┫╋

Rules

A B
v v
┗┳┛
 v
A+B
 A B
 v v
 ┣━┛
 v
A&~B
╺━ > 1
0 < ━╸
A
v
┣━┓
v v
A A
 A
 v
┏┻┓
v v
A A
    A
    v
B > ╋ > B
    v
    A

Extension

This extension allows for programs to loop There is one mandatory output that determines the Halt state

╹
H

For every output of the program, there exists an optional input for the previous state of the program (or initial program input)

 A  B  C  D
 ╻  ╻  ╻  ╻
 .  .  .  .
 .  .  .  .  .
 .  .  .  .  .
 ╹  ╹  ╹  ╹  ╹
 A  B  C  D  H

Examples

Add two bits together

 ╻  ╻
 ┣┳━┫
 ┃┃┓┃
 ┃┃┣┛
 ┣╋┛
┏┫┃
┃┗┫
╹ ╹
Example input: 11
 ┓  ┓
 ┣┳━┫
 ┃┃┓┃
 ┃┃┣┛
 ┣╋┛
┏┫┃
┃┗┫
╹ ╹

 ┓ ┓
 ┣┳┛
 ┃┃┓┓
 ┃┃┣┛
 ┣╋┛
┏┫┃
┃┗┫
╹ ╹

   ┓
 ╺┳┛
  ┃┓┓
 ┓┃┣┛
 ┣╋┛
┏┫┃
┃┗┫
╹ ╹

  ┓┓
 ┓┣┛
 ┣┛
┏┫┓
┃┗┫
╹ ╹

 ┓
┏┫┓
┃┗┫
╹ ╹

  ┓
┓╺┫
╹ ╹

┓┏
╹╹
Output: 10

Pulse

b B
╻ ╻
┣┓┃
┃┣┛
┃┗┓ ┏
╹ ╹ ╹
B p H