ILlogIc.

From Esolang
Jump to navigation Jump to search

ILlogIc. is an esolang by User:Ϫ based on logic gates.

Syntax

  • All variables start as false.
  • Conditionals can have NOT, OR, XNOR, AND, and other logic gates.

Commands

All Commands
Command Effect
Retrieve A Sets A to the user-input.
Out ABCD.. Outputs the binary number formed by A, B, C, D, etc...
If (conditional) Skips the next line if the condition is false.
A becomes (conditional) Evaluates the condition and stores its result in A.
{(any string) Added after a line as a marker.
}(any string) Added after a line to signify that after you process this line you should go to the line with the {-marker and execute it, then keep going from there. If there are both }-markers and {-markers on a line, the {-marker goes first.

Programs

Infinite Loop

As a side effect of the marker system, there is no such thing as a simple infinite loop with no command. Therefore, we have multiple different loop types:

Output Loop
Out A {Ϫ }Ϫ
Toggle Loop
A becomes NOT A {Ϫ }Ϫ
Stasis Loop
A becomes A {Ϫ }Ϫ

0 to 16 looping counter

F becomes NOT F
A becomes A XOR F {loop
B becomes A AND F
C becomes B AND F
B becomes B XNOR F
D becomes C AND F
C becomes C XNOR F
D becomes D XNOR F
Out ABCD }loop