## CODE CONVERTERS

The conversion from one binary code to another is common in digital systems. In this experiment, you will design and construct three combinational-circuit converters.

### Gray Code to Binary

Design a combinational circuit with four inputs and four outputs that converts a four-bit Gray code number (Table 1) into the equivalent four-bit binary number. Implement the circuit with exclusive-OR gates. Connect the circuit to four switches and four LED's and check for proper operation.

Table 1 - Gray Code

### Seven-Segment Display

A seven-segment indicator is used for displaying any one of the decimal digits 0 through 9. Usually, the decimal digit is available in BCD. A BCD-to-seven-segment decoder accepts a decimal digit in BCD and generates the corresponding seven-segment code. This is shown pictorially in Figure 1.

Figure 1 - 7-segment and Numerical Designation

Figure 2 shows the connections necessary between the decoder and the display. The 7447 IC is a BCD-to-seven-segment decoder/driver. It has four inputs for the BCD digit. Input D is the most significant and input A the least significant. The 4-bit BCD digit is converted to a seven-segment code with outputs (a) through (g). The outputs of the 7447 are applied to the inputs of the 7730 (or MAN72) seven-segment display. This IC contains the seven LED (light emitting diode) segments on top of the package. The input at pin 14 is the common anode (CA) for all the LED's. A 47Ω resistor to Vcc is needed in order to supply the proper current to the selected LED segments. Other equivalent seven-segment display IC's may have additional anode terminals and may require different resistor values.

Construct the circuit shown in Figure 2. Apply the 4-bit BCD digits through four switches and observe the decimal display from 0 to 9. Inputs 1010 through 1111 have no meaning in BCD.

Figure 2 - BCD to Seven-Segment Decoder and Seven-Segment Display

Depending on the decoder, these values may cause either a blank or a meaningless pattern to be displayed. Observe and record the output displayed patterns of these six unused input combinations. For an additional exercise, repeat the above procedure using a 7448 driver with a common cathode (CC) display (MAN74).