#16. Logic Nodes

Note This is a web-version of a tutorial chapter embedded right into the XOD IDE. To get a better learning experience we recommend to install the desktop IDE or start the browser-based IDE, and you’ll see the same tutorial there.

Boolean values are cool. You can use them to construct complex logic systems. In XOD, you will find a lot of nodes for this purpose. All of them are located in xod/core.

Patch

  • and returns true if both inputs (IN1 and IN2) are true
  • or returns true if IN1, IN2, or both are true
  • xor returns true if only one of IN1 and IN2 is true
  • not inverts the input value
  • nand is an inverted and
  • nor is an inverted or

Test circuit

Circuit

↓ Download as a Fritzing project

In the example patch above the and node returns false until both buttons are pressed. The not node inverts the value from the and node, so the LUM pin receives its true value (1). Thus, the LED turns on.

Pressing one of the buttons changes nothing. The LED will turn off only when the LUM pin receives false (0). This will happen only if the not node receives the true value, which is possible only if both buttons are pressed at the same time.

Next lesson →

Found a typo or mistake? Want to improve the text? Edit this page on GitHub and open a pull request. If you have a complex proposal or you want to discuss the content, feel free to start a new thread on XOD forum.