Simplified Circuit Diagram

Simplified Circuit Diagram is a language created by user:ps4star and is a 1-dimensional simplified version of the Circuit Diagram language.

Syntax
Simplified Circuit Diagram uses an Assembly-like syntax where the command name and parameters are separated by spaces. A typical program should look like this:

Commands

 * NOTE 1: The interpreter will always start reading from the file "MAIN.cdl". The EXEC function can be called in the MAIN.cdl file to change the file it runs from the main to something else.


 * NOTE 2: If the mode is 1 (which is the default value if no value is set), the program only outputs the values of the wires. If the mode is 2, the program also outputs the wire dictionary after every instruction. If the mode is 3, the program outputs each command and the change in the wires after the command is run, as well as the values of the wires.


 * NOTE 3: The new wire created from the SPLIT will be named the highest wire ever assigned plus one. So if you call  then SPLIT a wire, you now have 4 wires: 1, 2, 3, 4. So the name of the wire that is created from the first SPLIT instruction will be Input_Wires + 1. Then the second SPLIT instruction you call will be have the name of Input_Wires + 2, and so on.

Full Adder Circuit
Adds the 3 input wires together.

Full Subtractor Circuit
Subtracts the first wire by the second wire; the third wire is the carry value.

Interpreters/Compilers
Python Interpreter by ps4star.