Algorithms Visual Handbook · lab
A stack machine, running
Postfix notation puts the operator after its two values: 3 4 + is seven. There are no parentheses, because the order already is the grouping. That is the whole trick, and it is why a machine can evaluate it with one stack and no lookahead.
The stack here is not a variable hidden in some code. It is a box on the screen with its contents visible and its top marked, and the number that lands in it got there by travelling: out of the tape, along the belt, through the dispatcher that asks "value or operator?" — and back down from the operator over the clock edge.
The pacing is the part worth watching. Nothing schedules the tape: the stack asks for the next symbol only once it has applied the last one. Two operators in a row therefore cannot run into each other, and a longer expression costs more ticks because there is more work, not because a timer was turned down.
Check your understanding
The assessment for this lab has not been authored yet.