This page has no translation to Italiano yet. The original English version is below. If you’d like to help, great! See how to translate a documentation page in the contribution guide.
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.


Screenshot of 011-branching

Choosing between values based on some condition is a common task. For this, there is an if-else node in xod/core.

The COND pin of this node checks the boolean input value. If COND receives true, the node sets the value from the T pin to the R pin. When it receives false, it sets the value from the F pin to the R pin.

Exercise #

Learn how if-else behaves.

  1. Run the simulation.
  2. Change the value of the tweak-boolean node, observe how if-else output chenges.
  3. Replace tweak-boolean with a flop-flop with TGL pin connected to a clock.
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.