Activity 5.2C – Code Converters

Purpose

1.To understand what an encoder is.

2.To determine the logic for a decimal to BCD encoder

3.To use 74147 IC to build a decimal to BCD encoder

Equipment

Simulation Software

Procedure

Part 1:

Using a pencil or pen, complete the circuit for the basic decimal to BCD encoder below by connecting the decimal lines to the output. For example, since the MSB will only be lit (on) when either a decimal 8 or a decimal 9 is activated, the OR gate connected to the MSB has been connected to 8 and to 9. The circuit should display the correct Binary output when the switch for the decimal digit is active and all other switches are inactive. For example, if input line 8 is HIGH (and all others LOW) then in the output we will have a HIGH in A3 and a LOW in the other three output lines (this is decimal digit 8 in BCD code, or 1000).

Using the simulation software, create circuit as you created it and verify that it is correct.

Demonstrate the simulation to your teacher get signature:______

What binary output is displayed when the 9 and 5 switches are both turned high?

Would this be a problem for a “true” encoder circuit? Explain.

Part 2: Priority Encoder

This part of the Activity uses a popular decimal-to-BCD encoder, the IC 74147 chip. This is a priority encoder with active LOW inputs for decimal digits 1 through 9 and active LOW BCD output. The figure below shows the logic symbol for this encoder. (Notice that to indicate active LOW we use the bubble notation.)

Using the software simulation tool build and run the circuit shown below.

By toggling the nine input switches, complete the table below.

INPUTS

/

OUTPUTS

BIT /
LEDS
9 / 8 / 7 / 6 / 5 / 4 / 3 / 2 / 1 / A3 / A2 / A1 / A0 / Display
0 / 1 / 1 / 1 / 1 / 1 / 1 / 1 / 1
1 / 0 / 1 / 1 / 1 / 1 / 1 / 1 / 1
1 / 1 / 0 / 1 / 1 / 1 / 1 / 1 / 1
1 / 1 / 1 / 0 / 1 / 1 / 1 / 1 / 1
1 / 1 / 1 / 1 / 0 / 1 / 1 / 1 / 1
1 / 1 / 1 / 1 / 1 / 0 / 1 / 1 / 1
1 / 1 / 1 / 1 / 1 / 1 / 0 / 1 / 1
1 / 1 / 1 / 1 / 1 / 1 / 1 / 0 / 1
1 / 1 / 1 / 1 / 1 / 1 / 1 / 1 / 0

Note: To thoroughly test the encoder you should test all the combinations of zeros and ones for the nine input switches. The problem with this approach this is that there are 512 (29 = 512) combinations from 000000000 to 111111111. You most likely don’t have enough time to test all possible combinations.

Apply a low (0) to bit 7 and bit 5 and a high (1) to all other inputs. What is the output on the display?

What is the difference between this encoder and the simple one you constructed previously?

Conclusion

1.Give an example where an encoder circuit would be used.