A three-way jump

You will learn

Why one ternary compare can branch three ways.

A binary machine branches on a flag: to tell less, equal and greater apart it tests twice. A ternary compare answers with one trit, so one instruction can jump three ways. The widget compares a and b at their first differing trit, lit gold, and takes the matching target. The machine of the next lesson ends its loops with exactly this jump.

Open the interactive lesson →