All exercises

NOT Gate

Implement a logical NOT gate Add-On Instruction in rungs.dev that inverts a single BOOL input every scan and writes the negated result to the output.

beginner

Parameters

NameTypeUsageDescription
In_InputBOOLInputThe boolean value to be negated.
Out_NegatedOutputBOOLOutputThe negated result of the input.

Behavior

  1. During every scan, the AOI reads the value of In_Input.
  2. If In_Input is 0, the AOI sets Out_NegatedOutput to 1.
  3. If In_Input is 1, the AOI sets Out_NegatedOutput to 0.
  4. Out_NegatedOutput reflects the inversion of In_Input within the same scan.

Ready to start?

Open this exercise in Rungs Studio, write your solution, then click Test in the toolbar to verify your work against the built-in test cases.