Concept Flow - Why operators drive computation
Start with values
Apply operator
Compute result
Store or use result
End or next operation
Operators take values, perform calculations, and produce results that can be stored or used next.
a <- 5 b <- 3 c <- a + b print(c)
| Step | Action | Expression | Result | Variable State |
|---|---|---|---|---|
| 1 | Assign 5 to a | a <- 5 | 5 | a=5, b=undefined, c=undefined |
| 2 | Assign 3 to b | b <- 3 | 3 | a=5, b=3, c=undefined |
| 3 | Add a and b | a + b | 8 | a=5, b=3, c=undefined |
| 4 | Assign sum to c | c <- a + b | 8 | a=5, b=3, c=8 |
| 5 | Print c | print(c) | 8 | a=5, b=3, c=8 |
| Variable | Start | After Step 1 | After Step 2 | After Step 4 | Final |
|---|---|---|---|---|---|
| a | undefined | 5 | 5 | 5 | 5 |
| b | undefined | undefined | 3 | 3 | 3 |
| c | undefined | undefined | undefined | 8 | 8 |
Operators take values and perform calculations. Example: c <- a + b adds a and b. Result must be assigned to store it. Operators drive the flow of computation. Without operators, no calculations happen.