A ladder rung is a line of elements between a left rail and a right rail. Power flow, a logical result rather than a real current, passes from the left rail through contacts to a coil on the right. A contact asks about a bit, and a coil writes a bit. The PLC repeats a cycle called the scan: it reads every input, solves the rungs from top to bottom, then writes every output. A coil's bit changes as soon as its rung is solved, so a lower rung in the same scan reads the new value.
Addresses are in IEC style: %I0.0 is an input bit, %Q0.0 an output bit and %M0.0 a memory bit. Some PLC families write them differently, such as I0.0 or X0. In equations, %I0.0 is written I0.0, %Q0.0 is Q0.0, and so on. An input bit is 1 while its field contact is closed and 24 V reaches the input, and 0 while the contact is open or its wire is cut.
CONTACT PASSES POWER FLOW
NO: p=xNC: p=x
For any contact. x is the bit the contact is addressed to and p is 1 when the contact passes power flow; x and p each take the value 1 or 0. A normally open (NO, examine-if-closed) contact passes when its bit is 1, a normally closed (NC, examine-if-open) one when its bit is 0.
SERIES IS AND, PARALLEL IS OR
Q=(A⋅B)+C
For contacts A and B in series with C in a branch across both. A, B, C are their values of p; Q is 1 when power flow reaches the coil, which writes Q to its bit. Series contacts must all pass (AND); one passing branch is enough (OR, so 1+1=1).
By the two rules above, the equation of this rung is Q0.0=(I0.0⋅I0.1)+I0.2.