Challenge - 5 Problems
PLC Math Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediateOutput of ADD instruction in PLC
Given the following PLC code snippet using the ADD instruction, what is the value of the variable RESULT after execution?
ADD 5, 3, RESULT
ADD 5, 3, RESULT
PLC Programming
ADD 5, 3, RESULT
Attempts:
2 left
💡 Hint
ADD instruction sums the first two numbers and stores in the third.
✗ Incorrect
The ADD instruction adds 5 and 3, resulting in 8 stored in RESULT.
💻 Command Output
intermediateOutput of SUB instruction in PLC
What is the value of RESULT after executing this PLC instruction?
SUB 10, 4, RESULT
SUB 10, 4, RESULT
PLC Programming
SUB 10, 4, RESULT
Attempts:
2 left
💡 Hint
SUB subtracts the second number from the first.
✗ Incorrect
10 minus 4 equals 6, so RESULT is 6.
💻 Command Output
advancedResult of MUL instruction with variables
Consider the following PLC instructions:
VAR1 = 7
VAR2 = 6
MUL VAR1, VAR2, RESULT
What is the value of RESULT?
VAR1 = 7
VAR2 = 6
MUL VAR1, VAR2, RESULT
What is the value of RESULT?
PLC Programming
VAR1 = 7 VAR2 = 6 MUL VAR1, VAR2, RESULT
Attempts:
2 left
💡 Hint
MUL multiplies the first two operands.
✗ Incorrect
7 multiplied by 6 equals 42, stored in RESULT.
💻 Command Output
advancedDIV instruction with integer division
What is the value of RESULT after this PLC instruction?
DIV 20, 3, RESULT
DIV 20, 3, RESULT
PLC Programming
DIV 20, 3, RESULT
Attempts:
2 left
💡 Hint
DIV performs integer division truncating decimals.
✗ Incorrect
20 divided by 3 is 6 with remainder, RESULT stores 6.
🧠 Conceptual
expertBehavior of DIV instruction with zero divisor
What happens when the DIV instruction is executed with the divisor set to zero, like this?
DIV 10, 0, RESULT
DIV 10, 0, RESULT
PLC Programming
DIV 10, 0, RESULT
Attempts:
2 left
💡 Hint
Division by zero is not allowed in math operations.
✗ Incorrect
Dividing by zero causes a runtime error and stops execution.
