A one bit multiplies the squared value by the base. A zero bit keeps the square.

highlighted = computed this step

The first one bit starts the value

The ladder begins at 1. Because the first bit is 1, multiplying by base 7 gives row result 7.

17mod33=71\cdot7\bmod{}33=7
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313

A one bit multiplies

When the bit is 1, the row multiplies the square by base 7.

bit=1\text{bit}=1
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313

Multiply and reduce

Here square 16 times base 7 reduces to 13.

167mod33=1316\cdot7\bmod{}33=13
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313

A zero bit skips

When the bit is 0, the multiply column is skipped and the row result stays 4.

bit=0r=4\text{bit}=0\Rightarrow r=4
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313

What skip means

Skip does not mean ignore the row. It means the square value 4 is already the row result 4.

square only=4\text{square only}=4
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313

Summary

A bit chooses between square-only and square-then-multiply; both paths still reduce to one row result.

bit controls multiply\text{bit controls multiply}
Multiply on one bitsThe ladder rows are recomputed from pinned base, exponent, and modulus.Multiply on one bits - 7^13 mod 33stepbitpriorsquaremultiplyresult01117711716131320134skip4314161313