Download as pdf or txt
Download as pdf or txt
You are on page 1of 63

Ph.D.

Marving Omar Aguilar Justo


Engineering School - Mechatronics Engineering

Combinational Logic
Logic Circuits

Notes extracted from the book: “Sistemas Digitales: Principios y Aplicaciones”,


Ronald D. Tocci, Ed. Pearson Prentice Hall, 10ª Ed., 2007.

February – June 2020


➢ Decoders
➢ Encoders
➢ Multiplexers
➢ Demultiplexers

Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Decoders
Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Definition

A decoder is called a logic circuit that accepts a set of inputs that


represent binary numbers and that only activates the output
corresponding to such input datum.

inputs
Decoder outputs

Only one output


input is at HIGH for
codes
each input code

Ph.D. Marving O. Aguilar J.


3 to 8 Lines Decoder

Ph.D. Marving O. Aguilar J.


3 to 8 Lines Decoder

Ph.D. Marving O. Aguilar J.


74ALS138 Decoder

Ph.D. Marving O. Aguilar J.


74ALS138 Decoder

Output
Reply to the input code A2 A1 A0
Disable – All at HIGH
Disable – All at HIGH
Disable – All at HIGH

1 of 8 Decoder

Ph.D. Marving O. Aguilar J.


Example 2.18
74ALS138 Decoder

Indicate the status of


the output when the
input states are:

E1E2E3 = 110

A2A1A0 = 110

Ph.D. Marving O. Aguilar J.


Example 2.18
74ALS138 Decoder

Outputs

Reply to the input code A2 A1 A0


Disable – All at HIGH Indicate the status of
Disable – All at HIGH the output when the
Disable – All at HIGH input states are:

E1E2E3 = 110

A2A1A0 = 110

O7O6O5O4O3O2O1O0 =
1 to 8 Decoder
11111111

Ph.D. Marving O. Aguilar J.


Example 2.19
74ALS138 Decoder

Indicate the status of


the output when the
input states are:

E1E2E3 = 001

A2A1A0 = 011

Ph.D. Marving O. Aguilar J.


Example 2.19
74ALS138 Decoder

Outputs

Reply to the input code A2 A1 A0


Disable – All at HIGH Indicate the status of
Disable – All at HIGH the output when the
Disable – All at HIGH input states are:

E1E2E3 = 001

A2A1A0 = 011

O7O6O5O4O3O2O1O0 =
1 to 8 Decoder
11110111

Ph.D. Marving O. Aguilar J.


Example 2.20
74ALS138 Decoder

Indicate the status of the output when the input states are:
A4A3A2A1A0 = 01101
Ph.D. Marving O. Aguilar J.
Example 2.20
74ALS138 Decoder

11111111 11111011 11111111 11111111


Indicate the status of the output when the input states are:
A4A3A2A1A0 = 01101 011012 = 1310 activating O13
Ph.D. Marving O. Aguilar J.
Example 2.21
74ALS138 Decoder

Indicate the status of the output when the input states are:
A4A3A2A1A0 = 10001
Ph.D. Marving O. Aguilar J.
Example 2.21
74ALS138 Decoder

11111111 11111111 10111111 11111111


Indicate the status of the output when the input states are:
A4A3A2A1A0 = 10001 100012 = 1710 activating O17
Ph.D. Marving O. Aguilar J.
Decoder / 7 Segment BCD Driver

The term Controller in Decoder / Driver is added


because the outputs can operate with higher current
and voltage limits than those of a normal TTL output.

The outputs of the 7445 can drain up to 80 mA in the


LOW state, and can rise to 30 V in the HIGH state. This
makes them suitable for handling loads directly, such
as LEDs or indicator lamps, relays or DC motors.

Ph.D. Marving O. Aguilar J.


Decoder / 7 Segment BCD Driver

Anode
Common anode
connections
Cathode

Decoder / 7
Segment
BCD BCD Driver
input

Inputs to
erase
LEDs
test input To limit the
current

Ph.D. Marving O. Aguilar J.


Decoder / 7 Segment BCD Driver

Ph.D. Marving O. Aguilar J.


Example 2.22
Decoder / 7 Segment BCD Driver

Anode
Common anode
Cathode connections

Decoder / 7
Segment
BCD BCD Driver
input

Inputs to
erase
LEDs
test input 7446 or 7447 To limit the
current

Each of the LEDs on the ordinary 7 segment LED display


operates at 10 mA and 2.7 V. What should be the value of the
resistors when Vcc = 5 V?

Ph.D. Marving O. Aguilar J.


Example 2.22
Decoder / 7 Segment BCD Driver

Anode
Common anode
Cathode connections

Decoder / 7 Solution:
Segment
BCD BCD Driver
R = VR/I
input R = (5 V − 2.7 V) / (0.01 A)
R = (2.3 V ) / (0.01 A)
Inputs to R = 230   220 
erase
LEDs
test input 7446 or 7447 To limit the
current

Each of the LEDs on the ordinary 7 segment LED display


operates at 10 mA and 2.7 V. What should be the value of the
resistors when Vcc = 5 V?

Ph.D. Marving O. Aguilar J.


Decoder / 7 Segment BCD Driver with LCD

Incidental
light

Backplane

40 Hz Signal Segment

Control Segment
Backplane
LOW Off
HIGH On

Ph.D. Marving O. Aguilar J.


Decoder / 7 Segment BCD Driver with LCD

All the 74HC86 ICs

Decoder / 7
Segment
BCD Driver

Backplane

Ph.D. Marving O. Aguilar J.


Encoders
Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Encoders

Encoders

M inputs N bits output


There is only one at code
HIGH at any given
time

Ph.D. Marving O. Aguilar J.


Octal to Binary Encoder

Inputs Outputs

Ph.D. Marving O. Aguilar J.


Octal to Binary Encoder

8
Intputs

*Only one
input LOW
at a time

Ph.D. Marving O. Aguilar J.


Example 2.23
Octal to Binary Encoder

Determine the output of the encoder


when the input is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11101111

8
Intputs

*Only one
input LOW
at a time

Ph.D. Marving O. Aguilar J.


Example 2.23
Octal to Binary Encoder

Determine the output of the encoder


when the input is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11101111

Solution:
O2O1O0 = 1002

8
Intputs

*Only one
input LOW
at a time

Ph.D. Marving O. Aguilar J.


Example 2.24
Octal to Binary Encoder

Determine the output of the encoder


when the intput is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11010111

8
Intputs

*Only one
input LOW
at a time

Ph.D. Marving O. Aguilar J.


Example 2.24
Octal to Binary Encoder

Determine the output of the encoder


when the intput is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11010111

Solution:
¿¿ O2O1O0 = 1112 = 710 ??

8
Intputs
¿Why?

*Only one
input LOW
at a time

Ph.D. Marving O. Aguilar J.


Example 2.25
Octal to Binary Encoder with Priority

Determine the output of the encoder


when the input is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11010111

74148
Codificador Octal a
Octal to Binary
Binario
Encodercon Prioridad
with Priority
8
Intputs

Ph.D. Marving O. Aguilar J.


Example 2.25
Octal to Binary Encoder with Priority

Determine the output of the encoder


when the input is:
A7’A6’A5’A4’A3’A2’A1’A0’=
11010111

74148 Solution:
O2O1O0 = 1012
Codificador Octal a
Octal to Binary
Binario
Encodercon Prioridad
with Priority
8
Intputs

Ph.D. Marving O. Aguilar J.


Decimal to BCD Encoder with Priority

IC 74147

X = either 0 or 1
Inverted BCD

Ph.D. Marving O. Aguilar J.


Decimal to BCD Encoder with Priority

IC 74147

74147
Decimal to
BCD
Encoder with
Priority

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.26
Decimal to BCD Encoder with Priority

IC 74147
Determine the output of the encoder
when the input is:
A9’A8’A7’A6’A5’A4’A3’A2’A1’=
110101010
74147
Decimal to
BCD
Encoder with
Priority

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.26
Decimal to BCD Encoder with Priority

IC 74147
Determine the output of the encoder
when the input is:
A9’A8’A7’A6’A5’A4’A3’A2’A1’=
110101010
74147
Decimal to
BCD Solution:
Encoder with O3’O2’O1’O0’ = 1000
Priority
It is 0111BCD = 710

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.27
Decimal to BCD Encoder with Priority

IC 74147
Determine the output of the encoder
when the input is:
A9’A8’A7’A6’A5’A4’A3’A2’A1’=
111011011
74147
Decimal to
BCD
Encoder with
Priority

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.27
Decimal to BCD Encoder with Priority

IC 74147
Determine the output of the encoder
when the input is:
A9’A8’A7’A6’A5’A4’A3’A2’A1’=
111011011
74147
Decimal to
BCD Solution:
Encoder with O3’O2’O1’O0’ = 1001
Priority

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.28

Decimal to BCD Encoder with Priority

IC 74147
Determine what input the encoder must
have so that the inverted BCD output is
the number 310
74147
Decimal to Solution:
BCD
Encoder with
Priority

Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Example 2.28

Decimal to BCD Encoder with Priority

IC 74147
Determine what input the encoder must
have so that the inverted BCD output is
the number 310
74147
Decimal to Solution:
BCD The 310 is the 1100BCD_inv
Encoder with So
Priority A9’A8’A7’A6’A5’A4’A3’A2’A1’=
111111000 or
111111001 or
111111010 or
111111011, that is
1111110XX
Nine Inverted
inputs BCD

Ph.D. Marving O. Aguilar J.


Decimal to BCD Switch Encoder with Priority

Resistance to VCC for each


encoder input

The 10 switches could be


those of a keyboard in a
calculator that represent
the digits from 0 to 9.
74LS147
Decimal
to BCD
Switch Normal
Encoder BCD
with
Priority

Ph.D. Marving O. Aguilar J.


Multiplexers
Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Definition

It is called digital multiplexer, or data selector, to the logic circuit


that accepts several digital inputs and selects one of them at a
given time to pass it to the output.

Output
Z

The SELECTION code


DATA determines which input is
inputs transmitted to the output Z.

SELECTION
inputs

Ph.D. Marving O. Aguilar J.


2-Input Multiplexer

DATA
inputs

Output

SELECTION input

Ph.D. Marving O. Aguilar J.


4-Input Multiplexer

Output

Ph.D. Marving O. Aguilar J.


4-Input Multiplexer

Tri-state
buffers

Output

Decoder

Ph.D. Marving O. Aguilar J.


74ALS151 8-Input Multiplexer

Inputs Outputs

Ph.D. Marving O. Aguilar J.


74ALS151 8-Input Multiplexer

8-Input Multiplexer
Inputs Outputs

Ph.D. Marving O. Aguilar J.


Example 2.29
8-Input Multiplexer

Data What function does the


inputs
circuit perform?

Data
inputs

Ph.D. Marving O. Aguilar J.


Example 2.29
8-Input Multiplexer

Data What function does the


inputs
circuit perform?

Solution:
With S3=1 the lower MUX
is selected, and the output
X depends on the data
inputs of the lower MUX.
With S3=0 the upper MUX
is selected, and the X
Data
inputs
output depends on the
data inputs of the upper
MUX.

Ph.D. Marving O. Aguilar J.


Quadruple 2-Input Multiplexer

Ph.D. Marving O. Aguilar J.


Quadruple 2-Input Multiplexer

Ph.D. Marving O. Aguilar J.


Example 2.30
8-Input Multiplexer
Storage
register
What function does the
circuit perform?

Important Note: Firstly,


analyze the function of the
new devices (the register
and the counter)

Clock
Ascending Counter

Ph.D. Marving O. Aguilar J.


Example 2.30
8-Input Multiplexer
Storage
register
What function does the
circuit perform?

Solution:
It performs a parallel to
serial data transfer
conversion.

Clock
Ascending Counter

Ph.D. Marving O. Aguilar J.


Demultiplexers
Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Definition

It is called digital demultiplexer, or data distributor, to the logic


circuit that receives a single input and distributes it through
several outputs.

DATA The DATA input is transmitted to


input only one of the outputs, as
determined by the selection
input code.

Ph.D. Marving O. Aguilar J.


1 to 8 Lines Demultiplexer

SELECTION OUTPUTS
code

DATA input
Ph.D. Marving O. Aguilar J.
1 to 8 Lines Demultiplexer

DATA input

Logic “1”

Waveforms for

SELECTION OUTPUTS
code
Selection
code Decoder

Ph.D. Marving O. Aguilar J.


Example 2.31
1 to 8 Line Demultiplexer

What function does the


circuit perform? From the
doors 1-5

Door 0

Monitoring panel

Door 6 Door 7
CLOCK

Ph.D. Marving O. Aguilar J.


Example 2.31
1 to 8 Line Demultiplexer

What function does the


circuit perform? From the
doors 1-5
Solution:
It is an 8-door security
monitoring system. The
LEDs are indicators of
Door 0
which of the doors are
open.

Monitoring panel

Door 6 Door 7
CLOCK

Ph.D. Marving O. Aguilar J.


➢ Decoders
➢ Encoders
➢ Multiplexers
➢ Demultiplexers

Combinational Logic
Logic Circuits

Ph.D. Marving O. Aguilar J.


Ph.D. Marving Omar Aguilar Justo
Engineering School - Mechatronics Engineering

Combinational Logic
Logic Circuits

Notes extracted from the book: “Sistemas Digitales: Principios y Aplicaciones”,


Ronald D. Tocci, Ed. Pearson Prentice Hall, 10ª Ed., 2007.

February – June 2020

You might also like