The big idea
The circuit diagram is an attempt to visualize propositional logic statements or Boolean circuits. On the web app, this diagram will update as the user provides more information.Simple cases
That is, suppose you have a non-atomic proposition like \(\texttt{walk} \land \texttt{swim}\), where, e.g., \(\texttt{walk}\) corresponds to "the person walks" and \(\texttt{swim}\) corresponds to "the person swims".
This is what the diagram will look like, before anything has been indicated about whether the person walks or swims — i.e., before any box on the form has been checked off.
There are two things to notice about this simple example.
First, each of the propositions will be represented as a box.
Second, note that the two boxes here are joined by a line. That's because you can make the whole proposition (\(\texttt{walk} \land \texttt{swim}\)) true by making both of its constituent parts — i.e., both \(\texttt{walk}\) and \(\texttt{swim}\) — true.
In general, there will be a path in the diagram for every assignment of truth values to the boolean variables that makes the whole proposition true. (This will become clearer in the more complicated examples below.) So, making the whole proposition true would correspond to finding a path through the circuit diagram.
Suppose you indicate that the person walks...
Then the left corner of the \(\texttt{walk}\) will turn green.And if you indicate that the person also swims...
Then the left corner of \(\texttt{swim}\) will also turn green, and there will be a path going from the left to the right — a path corresponding to the assignment of values to the Boolean variables that makes the whole proposition true. More impressionistically: this visual shows how you can make the whole proposition true by making both \(\texttt{walk}\) and \(\texttt{swim}\) true.But if you had indicated that the person walks but does not swim...
the bottom left corner of the \(\texttt{swim}\) box turns red instead.Ands and Ors
So far we've just seen examples involving conjunction. But what about disjunctions?Here's what \(\texttt{walk} \vee \texttt{swim}\) looks like:
More complicated examples
Let's end with two more complicated examples.Here's \( \texttt{walk} \land ( \texttt{sing} \vee \texttt{swim} ) \) (in prose: walks and (sings OR swims)):
And here's \( \texttt{walk} \vee ( \texttt{sing} \land \texttt{swim} ) \) (in prose: walks OR (sings AND swims)):
There's more that can be said, but this should be enough for you to start playing with the web app!