how to compare each digit between texts and assign zero if the units match?
If I understand correctly, try this:
The Exclusive Or (xor) operation is what you need.