O'Reilly logo

Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL by Mohammed Ferdjallah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.8 CODE CONVERTERS

Decoder and encoder circuits are used to convert from one type of input encoding to a different output encoding. For example, a 2: 4 decoder converts a 2-bit binary number input to a one-hot encoding sequence (see Section 9.6) at the output. Similarly, a 4: 2 binary encoder performs the opposite conversion. There are many other possible types of code converters known as BCD-to-seven-segment code converter, BCD-to-Gray code converter, BCD-to-excess-3 code converters, and so on.

images

Figure 7.21 4 : 2 Binary Encoder

images

Figure 7.22 4: 2 Priority Encoder

7.8.1 BCD-to-Seven-Segment Code Converter

A BCD-to-seven-segment code converter converts one binary-coded decimal (BCD) digit into information suitable for driving a digit-oriented display such as a seven-segment display. In other words, it converts the BCD digit into seven signals that are used to drive the segments in the display. The circuit of the BCD-to-seven-segment code converter has four binary inputs (x1, x2, x3, and x4), representing the BCD number, and seven binary outputs (a, b, c, d, e, f, and g) representing the LED segments. Each segment is a small LED, which glows when driven by an electrical signal. The BCD-to-segment code conversion truth table and a seven-segment LED display are shown in Figure 7.23. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required