Page 286 - Engineering Digital Design
P. 286

6.5 CODE CONVERTERS                                                 257


                 6.5 CODE CONVERTERS

                 Various codes are discussed at length in Section 2.10. On occasion it is necessary to convert
                 one code to another. Devices that are designed to execute a code conversion are called code
                 converters. Considering the many codes that are currently in use, it follows that there are
                 a very large number of converters possible. Not taking into account any particular area of
                 specialty, a few of the more common code conversions are as follows:


                    Binary-to-Gray conversion and vice versa
                    BCD-to-XS3 conversion and vice versa
                    Binary-to-BCD conversion and vice versa


                 6.5.1  Procedure for Code Converter Design
                 The following is a simple three-step procedure that will be followed in this text, often
                 without reference to this subsection:


                    1. Generally, follow the design procedure in Subsection 6.1.5.
                    2. If conversion involves any of the decimal code input (e.g., BCD), only 10 states can
                      be used. The six unused input states are called false data inputs. For these six states
                      the outputs must be represented either by don't cares (0's) or by some unused output
                      state, for example all 1's. That is, if the requirement is for false data rejection (FDR),
                      then the output states must correspond to at least one unused output state; if not,
                      0's are entered for the output states. Thus, FDR means that the outputs must never
                      correspond to a used output state when any one of the six unused states arrive at the
                      input terminals. If false data is not rejected, then the outputs corresponding to the six
                      unused states can take on any logic values, including those of used output states.
                    3. If the input code is any other than binary or BCD and if EV K-maps are to be used in
                      minimizing the logic, it is recommended that the input code be arranged in the order
                      of ascending binary, taking care to match each output state with its corresponding
                      input state.


                 6.5.2  Examples of Code Converter Design

                 To illustrate the code converter design process, four examples are presented. These examples
                 are quite adequate since the conversion procedure varies only slightly from one conversion
                 to another. The four examples are Gray-to-binary conversion, BCD-to-XS3 conversion,
                 BCD-to-binary conversion, and BCD-to-seven-segment-display conversion. Of these, the
                 last two are by far the most complex and perhaps the most important considering that binary,
                 BCD, and the seven-segment display are commonly used in digital design and computer
                 technology.

                 Gray-to-Binary Con version The Gray-to-binary conversion table for 4-bit codes is given
                 in Fig. 6.18a. Here, for convenience of plotting EV K-maps, the input Gray code and
                 the corresponding output binary code have been rearranged such that the Gray code is
                 given in ascending minterm code (compare Tables 2.1 and 2.12). The second-order EV
   281   282   283   284   285   286   287   288   289   290   291