Comment: encoding is like a kind of "secret word" game that kids like to play where they replace one letter by another. For example, one common code used by kids is "+1 psoition", so that B means A, C means B, and so on (A means Z). So a secret massage "Ifmmp" means "Hello".
encode letters in English alphabet using short and long pulses
Example: . . . is S    is OTry this Morse code applet: click here
Odometer reading: 500 ... 996 997 998 999 000 001 002 003 ... 499  ++++++++++ Value represented: 500 ... 4 3 2 1 0 1 2 3 ... 499
When overflow occurs, erroneous results will be produced
Demo program for OVERFLOW: click here
So: to use 10s complement code, we need to know how to convert a value to 10s complement and vice versa


Values 3 digit 10's compl repr Adding 2 positive 5 005 values + 9 + 009   14 014 > represents 14 Adding positive + 5 005 negative + 9 + 991   4 996 > represents 4 Adding negative + 5 995 positive + 9 + 009   4 004 > represents 4 Adding 2 negative 5 995 values + 9 + 991   14 986 > represents 14
Values 3 digit 10's compl repr Subtract 2 positive 5 005 values  9  009   4 996 > represents 4 Subtract positive  5 005 negative  9  991   14 014 > represents 14 Subtract negative  5 995 positive  9  009   14 986 > represents 14 Subtract 2 negative 5 995 values  9  991   4 004 > represents 4