All exercises

NOT Gate

Implement a logical NOT gate that inverts a boolean input.

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.

Edge Cases

  • The AOI correctly handles transitions of In_Input between 0 and 1.

Constraints

  • Out_NegatedOutput must reflect the inversion of In_Input within a single PLC 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.