Every logical circuit can be described with a Visual Prolog predicate, where the predicate indicates the relationship between the signals on the input and output terminals of the circuit. The fundamental circuits are described by giving a table of corresponding truth values (see the and_, or_, and not_ predicates in Program 4).
Fundamental circuits can be described by indicating the relationships between the internal connections, as well as the terminals. To see how this works, construct an exclusive OR circuit from AND, OR, and NOT circuits, and then check its operation with a Visual Prolog program. The circuit is shown in:
In HARDWARE.PRO, this network is described by the xor predicate.