All exercises

AND Gate

Implement a logical AND gate that outputs true only when both inputs are active.

beginner

Parameters

NameTypeUsageDescription
In_Input1BOOLInputFirst input signal for the AND logical operation.
In_Input2BOOLInputSecond input signal for the AND logical operation.
Out_AndResultBOOLOutputThe result of the logical AND operation.

Behavior

  1. When In_Input1 is 1 and In_Input2 is 1, Out_AndResult is set to 1.
  2. If either In_Input1 or In_Input2 is 0, Out_AndResult is set to 0.

Edge Cases

  • Handles cases where both inputs are 0.
  • Handles cases where inputs are mixed 0 and 1.

Constraints

  • The operation must be performed every scan cycle.

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.