2 ms·
A decimal digit is encoded in 4 bits as its usual encoding plus 3. Thus 0 is 0011 and 5 is 1000. Some nice things which happen are… - the carry bit out of you
by jws 6y ago
A decimal digit is encoded in 4 bits as its usual encoding plus 3. Thus 0 is 0011 and 5 is 1000.
Some nice things which happen are…
- the carry bit out of your 4 bit adder is the carry bit from the decimal add. (Your two digits plus their two threes makes sixteen)
- you never have more than three identical bits in a row (5 if you concatenate digits). This can be important for any kind of self clocked data stream. Too long without transitions and you aren’t really sure how many bits the sender meant because your clocks are a little off.
- it has a reasonable way to represent negative numbers.
One significant downside was that on each add you had to take a 3 back out.