Two numbers line up trit by trit; the first place from the top where they differ decides. The answer is itself a trit.
This widget runs in your browser and needs JavaScript.