Circuit
Jump to navigation
Jump to search
Circuit is a 2d esolang based on circuits. a basic circuit looks like this
>----:
the arrow(>) produces "electricity" and flows through the wires(-) every "tick" "electricity" flows through 1 wire. the and reaches the colon(:) ending the flow of "electricity".
Wire connections
-
will connect left to right
|
will connect bottom to top
\
will connect left and right to bottom
/
will connect left and right to top
+
will cross connect acting like a | and a -
⊥
will act like + without bottom
⊤
will act like + without top
⊢
will act like + without left
⊣
will act like + without right
x
+ but diagonal
Characters
| symbol | function |
|---|---|
| > | produces "electricity" to the right |
| < | produces "electricity" to the left |
| ^ | produces "electricity" upwards |
| v | produces "electricity" downwards |
| - | wire |
| : | wire end |
| O | outputs the string/value inside the "electricity" (default is 1) |
| ~ | switch. asks for user input. if 1 then let "electricity" flow. if 0 then stop "electricity". |
| N | inverter/negater. negates the value in the "electricity" if it's a number. if it's a binary value it just inverts |
| " | marks a string. if "electricity" hits the quotation marks, the "electricity" will have the string inside of it and skips everything inside the quotation marks |
| X | halts when "electricity" flows through it |
| () | comments |
| & | waits for "electricity" to go into it. takes every string inside each "electricity" current and concatenates them |
| # | if the "electricity" hits it then the "electricity" gets the number after the # stored in it. |
| ^ | number input or string input if you put a " after it |
Examples
&
>-"hello"---\
&-O: (outputs "hello world")
>-" world"--/
hello world
>-"hello, world!"-O:
And gate
>~>~O: (just like the real thing)
Or gate
>~---\
--O: (just like minecraft)
>~---/
Not gate
>~N-O:
NXOR
>~>~N---\
\
>~---\ -N-O:
---/
>~---/