projects / TempleOS in Web Browser

Logic

Enter a truth table, and it finds and draws a gate circuit that produces it.

Logic: a circuit for the column 0x96 built from AND, OR and NOT gates, drawn back from the output to inputs A, B and C

Open in TempleOS

#include "/Apps/Logic/Run"; You choose which gates are allowed, then type each input and output column as a hex number (for example A=0xF0, B=0xCC, C=0xAA).

The program searches level by level, applying every gate to every signal found so far until the outputs appear. The result is the shallowest circuit, though not always the one with the fewest gates. The gate symbols are sprites embedded in the source.