

THE BCD TO EXCESS 3 CODE CONVERTER
Introduction to Code ConvertersIf you kept a diary as a child, you probably used a secret language so to keep other people from reading your private thoughts. Some kids invent an entirely new alphabet for their diary. Some kids use numbers instead of letters. Some kids use code words. Whatever method you actually used, you in effect encoded the information in your diary so that others would have a difficult time trying to read what you wrote. If someone were to find the system you used to encode your diary, however, that person could potentially decode what you wrote and learn a lot of secrets about you. Code converters, more specifically encoders and decoders, have been used by children and adults alike to protect private information. Indeed, code converters have proven to be so effective that the National Security Agency (NSA) has made a career out of creating and breaking codes.
As you are about to find out, code converters are used for more than protecting private information. Here is an illustration. You go to your fridge to get some ice cream and find a frozen mouse on the bowl, with its tiny little teeth stuck in your ice cream. After taking a minute to catch your breath, you decide to tell your friend about this unusual event. However, there is a problem: your friend lives in a different zipcode half hour away. Consequently, you can’t yell the information to your friend as if your friend were in the next room; your voice will not carry that far (i.e., your voice is not portable over such distance). So you use your cellular phone instead. When you speak into the cellular phone, an encoder converts the sound of your voice into electrical signals — which can travel very fast over very long distances. When the electrical signals get to your friend’s cellular phone, a decoder converts the electrical signals back to the sound of your voice! So now you know: Code converters are used for more than protecting private information from spies. They are also used to enhance data portability and tractability.
Portability and tractability are not technical terms. They are mere English words. In our context portability means the information can be transported from location to location, such as from your house to your friend’s house. Tractability means the information can be easily managed, stored, used, etc. For instance, if you have a comprehensive encyclopedia in paper book form at home, and I have the same comprehensive encyclopedia in electronic book form on a thumb drive; not only can I carry mine in my pocket whereas you cannot even lift yours off the table, I can also do a word search more quickly than you can. Hence, my encyclopedia is more tractable than yours. BCD TO EXCESS3 CODE CONVERTER SYNTHESISWe will complete our introduction to code converters by designing an Excess3 Binary Coded Decimal (BCD) circuit. The term BCD refers to representing the ten decimal digits in binary forms; which simply means to count in binary; see Table 1 below. The Excess3 system simply adds 3 to each number to make the codes look different. We will not venture to discuss the importance of the Excess3 BCD system because the discussion would serve too great a distraction from our present purpose and the cost would outweigh the benefit. Suffice it to say that the Excess3 BCD system has some properties that made it useful in early computers.
The Excess3 BCD system is formed by adding 0011 to each BCD value as in Table 2. For example, the decimal number 7, which is coded as 0111 in BCD, is coded as 0111+0011=1010 in Excess3 BCD.
Our BCD Excess3 circuit will convert numbers from their binary representation to their excess3 representation. Hence our truth table is as below, Table 3.
Our task now is to use the truth table to find four switching expressions: one for W, one for X, one for Y,
and one for Z. We have two choices: we can use Boolean algebraic manipulations, or we can use
Karnaugh Maps. For the sake of expediency we will solve for the variables using KMaps. If you want to
see how to use Boolean algebraic manipulations, read the Boolean Algebra article. For W: W = A + BD + BC = A + B (D + C)
For X:
For Y:
For Z:
Now we have all the four switching functions we need to build the Excess3 circuit:
Here is how we will build the circuit. We will implement the circuit for output W first; only then will we
add the out for X; then for Y; then for Z. We use this one output at a time methodology to allow us to
test each output as it is built, so to catch errors early in the synthesis process.
Here is the interactive circuit for the output W. Play around with it to see that it works. Now we will add the output for X. Notice that X can be rewritten as X = B(C + D)’ + B’ (D + C). So all we need is an XOR gate to combine B and (D + C). Test Circuit 2 below to see that it implements X = BC’D’ + B’ (D + C). We will add the output for Y the same way. Y is simply the XNOR of C and D. Play around with Circuit 3 to see that it implements Y = C’D’ + CD. The final step in our implementation is to add the output for Z, which is just D’. Circuit 4 below is the final circuit; it is the BCD to Excess3 circuit.
You probably noticed that Circuit 4 does not look like the interactive circuit at the top of this page. We
invite you to check that they perform the exact same function. We use two different implementations to
impress upon you that you are free to implement your circuits however best fits your resources. 0 + 9 = 0011 + 1100 = 1111Pretty cool, No?! This property is known as selfcomplementing. We leave 3 + 6 and 4 + 5 for you to try.

