0% found this document useful (1 vote)
3K views36 pages

Code Converters, Multiplexers and Demultiplexers

Code converters, multiplexers, and demultiplexers are combinational logic integrated circuits that are used to select, convert, and route digital data. A multiplexer selects one of several input lines and routes it to a single output, while a demultiplexer takes a single input and routes it to one of multiple outputs. Common examples include binary-to-BCD converters, decoders that convert codes to numeric outputs, and analog multiplexers/demultiplexers that can route analog voltage levels in either direction.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
3K views36 pages

Code Converters, Multiplexers and Demultiplexers

Code converters, multiplexers, and demultiplexers are combinational logic integrated circuits that are used to select, convert, and route digital data. A multiplexer selects one of several input lines and routes it to a single output, while a demultiplexer takes a single input and routes it to one of multiple outputs. Common examples include binary-to-BCD converters, decoders that convert codes to numeric outputs, and analog multiplexers/demultiplexers that can route analog voltage levels in either direction.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Code Converters, Multiplexers and Demultiplexers

Introduction
Information, or data, that is used by digital devices comes in many formats. The mechanisms for the conversion, transfer, and selection of data are handled by combinational logic ICs.

COMPARATORS
A device used to compare the magnitude or size of two binary bit strings or words. The basic comparator evaluates two binary strings bit by bit and outputs a 1 if they are exactly equal. An XNOR gate is the easiest way to compare the equality of bits ( 0-0 or 1-1 x=1)

Binary comparator for comparing two 4-bit binary strings


A0 B0 A1 B1 A2 B2 A3 B3 Out = 1 if A0 =B0 A1 = B1 A2 = B2 A3 = B3

Comparators
Integrated circuit magnitude comparators are available in both TTL and CMOS families. A magnitude comparator not only determines if A equals B but also if A is greater than B or A is less than B. The 7485 is a TTL 4-bit magnitude comparator.

7485 TTL comparator

Magnitude comparison of two 8-bit binary strings (binary words)

8-bit comparison outputs

DECODING
Process of converting some codes (binary, BCD, or hex) into a singular active output representing its numeric value. Decoder a device that converts a digital code such as hex or octal into a single output representing its numeric value

BCD decoder example

3-bit Binary-to-Octal Decoding


Truth table for an Octal Decoder (a) Active-HIGH outputs Input Output 22 0 0 0 0 1 1 1 1 21 0 0 1 1 0 0 1 1 20 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 2 0 0 1 0 0 0 0 0 3 0 0 0 1 0 0 0 0 4 0 0 0 0 1 0 0 0 5 0 0 0 0 0 1 0 0 6 0 0 0 0 0 0 1 0 7 0 0 0 0 0 0 0 1

3-bit Binary-to-Octal Decoding


Truth table for an Octal Decoder (b) Active-LOW outputs Input Output 22 0 0 0 0 1 1 1 1 21 0 0 1 1 0 0 1 1 20 0 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 2 1 1 0 1 1 1 1 1 3 1 1 1 0 1 1 1 1 4 1 1 1 1 0 1 1 1 5 1 1 1 1 1 0 1 1 6 1 1 1 1 1 1 0 1 7 1 1 1 1 1 1 1 0

3-bit Binary-to-Octal Decoding

Decoder ICs
IC decoder chips provide basic decoding as well as several other useful functions. Manufacturers data books list several decoders and give function tables illustrating the input/output operation and special functions. Rather than designing decoders using combinational logic, it is much more practical to be able to use a data book to find a decoder that you need and to determine the proper pin connections and operating procedure to perform a specific decoding task.

Decoder ICs
Some of popular TTL decoder ICs Device Number Function 74138 7442 74154 7447
1-of-8 octal decoder (3-line-to-8-line) 1-of-10 BCD decoder (4-line-to-10-line) 1-of-16 hex decoder (4-line-to-16-line) BCD-to-seven-segment decoder

ENCODING
Encoder a device that converts a weighted numeric input line to an equivalent digital code, such as hex or octal. Encoding used to generate a coded output (such as BCD or binary) from a singular active numeric input line.

Encoders

Binary outputs

Typical block diagrams for encoders: a. decimal-to-BCD encoder; b. octal-to-binary encoder

Decimal-to BCD encoder truth table


Decimal Input 0 1 2 3 4 5 6 7 8 9 BCD output D 0 0 0 0 0 0 0 0 1 1 C 0 0 0 0 1 1 1 1 0 0 B 0 0 1 1 0 0 1 1 0 0 A 0 1 0 1 0 1 0 1 0 1

Basic decimal-to-BCD encoder

CODE CONVERTERS
Code converter a device that converts one type of binary representation to another, such as BCD to binary or binary to Gray code. BCD is very important for visual display communication between a computer and human beings. But BCD is very difficult to deal with arithmetically. Algorithms, or procedures, have been developed for the conversion of BCD to binary by computer programs (software) so that the computer will be able to perform all arithmetic operations in binary. Another way to convert BCD to binary, the hardware approach, is with MSI ICs. Additional circuitry is involved, but it is much faster to convert using hardware than software. (74184)

BCD-to-Binary Conversion
If you are going to convert BCD to binary using software program statements, you would first have to develop a procedure, or algorithm, for the conversion.

BCD-to-Seven-Segment Converters
Calculators and other devices with numeric displays use another form of code conversion involving BCD-to-seven-segment conversion. The term seven segment comes from the fact that these displays utilize seven different illuminating segments to make up each of the 10 possible numeric digit. A code converter must be employed to convert the 4-bit BCD into a 7-bit code to drive each digit. A commonly used BCD-to-seven-segment converter is the 7447 IC.

Gray Code
Gray code a binary coding system used primarily in rotating machinery to indicate shaft position. Each successive binary string within the code changes by only 1 bit. It is used primarily for indicating the angular position of a shaft on rotating machinery, such as automated lathes and drill presses. This code is like binary in that it can have as many bits as necessary, and the more bits, the more possible combinations of output codes (number of combinations = 2N). A 4-bit Gray code, for example, has 24 = 16 different representations, giving a resolution of 1 out of 16 possible angular positions at 22.5 each (360/16 = 22.5).

Four-Bit Gray Code

Gray Code Conversions


The determination of the Gray code equivalents and the conversions between Gray code and binary code are done very simply with XOR gates.

Binary-to-Gray code converter

Gray code-to-Binary converter

MULTIPLEXERS
Multiplexer a device or circuit capable of selecting one of several data input lines for output to a single line; sometimes referred to as data selector. It is capable of funneling several data lines into a single line for transmission to another point. The multiplexer has two or more digital input signals connected to its input. Control signal are also input to tell which datainput line to select fro transmission (data selection).

Functional diagram of a 4-line multiplexer

Logic diagram for a 4-line multiplexer

TTL and CMOS Multiplexers


Function Quad two-input Device 74157 74HC157 4019 74153 74HC153 4539 Eight-input 74151 74HC151 4512 74150 Logic Family TTL H-CMOS CMOS TTL H-CMOS CMOS TTL H-CMOS CMOS TTL

Dual eight-input

Sixteen-input

Providing Logic Functions with a Multiplexer


Multiplexers have many other uses besides functioning as data selectors. Another important role of a multiplexer is for implementing combinational logic circuits. One multiplexer can take the place of several Small-Scale Integration (SS) logic gates.

Providing Combinational Logic Functions with a Multiplexer

DEMULTIPLEXERS
Demultiplexer a device or circuit capable of routing a single data-input line to one of several data-output lines; sometimes referred to as data distributor. It is the opposite procedure from multiplexing. It takes a single input data value and routes it to one of several outputs.

Functional diagram of a 4-line demultiplexer

The 74139 dual 4-line demultiplexer

Connections to route an input data signal to the 2a output of a 74139

Analog Multiplexer/Demultiplexer
Several MUX/DEMUX are available in the CMOS family. The 4051, 4052, and 4053 are combination multiplexer and demultiplexer CMOS ICs. They can function in either configuration because their inputs and outputs are bidirectional, meaning that the flow can go in either direction. Also, they are analog, meaning that they can input and output levels other than just 1 and 0. The I/O levels can be any analog voltage between the positive and negative supply levels.

The 4051 CMOS analog multiplexer/ demultiplexer

You might also like