How Combinational Logic Devices Work - The Learning Circuit

element14 presents
14 Aug 201910:37

Summary

TLDRThis video from the Learning Circuit discusses combinational logic devices, specifically multiplexers (MUX), demultiplexers (DEMUX), encoders, and decoders. It explains how MUXs and DEMUXs route signals based on select lines, highlighting their applications. Encoders are used to convert data into binary form, while decoders convert binary data into other forms, such as decimal or controlling displays. Priority encoders, which prioritize specific inputs, and BCD (Binary Coded Decimal) concepts are also covered. The video aims to provide a foundational understanding of how these combinational logic components work in digital systems.

Takeaways

  • 💡 Combinational logic devices output based on the current state of their inputs, while sequential logic devices depend on both current and previous states.
  • 🔄 Multiplexers (muxes) act as digitally controlled switches that select one input from multiple inputs and route it to a single output.
  • 🔌 The 74LS157 is a 4-channel, 2-to-1 multiplexer with selectable inputs and an enable pin to control output activation.
  • 📊 Demultiplexers (demuxes) function in reverse, routing a single input to one of multiple outputs.
  • 🔢 Multiplexers and demultiplexers follow a 2^n format, where 'n' is the number of select lines. For example, a 4-to-1 MUX has 2 select lines.
  • 🧠 Encoders convert inputs into binary code, while priority encoders assign higher priority to certain inputs to avoid conflicts.
  • 🔄 Decoders convert binary inputs into other forms, such as decimal or signals for seven-segment displays, and often function similarly to demultiplexers.
  • 🖥️ Seven-segment displays use BCD (Binary Coded Decimal) to control each segment and display numbers.
  • 🎛️ BCD to seven-segment decoders translate 4-bit binary input into control signals for a seven-segment display.
  • 🧳 Encoders reduce data, similar to compressing a file, while decoders expand data, like unzipping a file.

Q & A

  • What is the main difference between combinational and sequential logic devices?

    -Combinational logic devices output a result based solely on the current inputs, while sequential logic devices also depend on the previous state of the inputs, meaning they have memory.

  • What are some common combinational logic devices?

    -The most common combinational logic devices are multiplexers, demultiplexers, encoders, and decoders.

  • How does a 2-to-1 multiplexer (MUX) work?

    -A 2-to-1 MUX has two inputs and one output. It uses a select pin to choose which of the two inputs is sent to the output. If the select pin is high, input A is selected, and if it is low, input B is selected.

  • What role does the enable pin play in a multiplexer?

    -The enable pin controls whether the output is connected to the inputs. When the enable pin is low, the output is enabled and reflects the selected input. When the enable pin is high, the outputs are disabled, meaning they all go low.

  • How does a demultiplexer (DEMUX) differ from a multiplexer?

    -A demultiplexer takes a single input and routes it to one of several outputs based on the select lines, while a multiplexer takes multiple inputs and selects one to be sent to the output.

  • What is the function of a priority encoder?

    -A priority encoder takes multiple input signals and outputs the binary code of the highest-priority active input. Inputs are prioritized, so if a higher-priority input is active, lower-priority inputs are ignored.

  • How does a 4-to-1 multiplexer differ from a 2-to-1 multiplexer?

    -A 4-to-1 multiplexer has four inputs and uses two select lines to choose which input is routed to the output, whereas a 2-to-1 multiplexer only has two inputs and one select line.

  • What is binary-coded decimal (BCD) and how is it used in decoders?

    -BCD is a method of representing decimal numbers using four-digit binary codes. In BCD-to-seven-segment decoders, the BCD input is used to control the segments of a display to represent decimal numbers.

  • What is the purpose of a BCD-to-decimal decoder?

    -A BCD-to-decimal decoder converts a binary-coded decimal input into a decimal output, where each decimal digit corresponds to a separate output.

  • What is the relationship between encoders and decoders in digital circuits?

    -Encoders convert multiple input signals into a smaller, binary-encoded output, while decoders perform the opposite function by converting binary inputs into a larger set of outputs, often for controlling displays or routing signals.

Outlines

00:00

🔧 Introduction to Digital Logic and Multiplexers

This paragraph introduces the concept of digital logic, focusing on combinational and sequential logic. Combinational logic, which does not rely on memory, is highlighted, whereas sequential logic retains memory of previous input states. The paragraph then dives into multiplexers (MUX), specifically the 74157 chip, which has 4 channels and operates as a 2-to-1 data selector. Key components like the select pin and enable pin are discussed, explaining how the state of these pins affects the output channels. Various examples of input and output states based on pin configurations are provided. The distinction between 2-to-1, 4-to-1, and 8-to-1 multiplexers is also briefly covered, along with a description of how demultiplexers (DMUX) work in reverse.

05:03

🔠 Encoders and Decoders in Logic Systems

This section explores the differences between multiplexers, demultiplexers, encoders, and decoders. While multiplexers and demultiplexers are used for simple signal routing, encoders translate input signals into binary codes, and decoders do the reverse. Priority encoders are introduced as a solution to signal conflicts, ensuring that the highest priority input takes precedence. The use of binary coded decimal (BCD) and its applications in controlling seven-segment displays is explained. Decoders are likened to demultiplexers as both devices determine the output based on binary inputs. The explanation of seven-segment displays includes a breakdown of how specific segments are lit to form numbers.

10:03

📁 Expanding and Compressing Data with Encoders and Decoders

This final paragraph ties together the discussion of encoders and decoders, using a file compression analogy to explain their roles in data manipulation. Encoders compress data, while decoders expand it, akin to zipping and unzipping files. The paragraph invites readers to ask questions or share additional insights on the Element14 community, reinforcing the collaborative learning aspect of the platform. It concludes with a friendly reminder to continue learning about these essential logic devices.

Mindmap

Keywords

💡Combinational Logic

Combinational logic refers to a system where the output is solely determined by the current state of the inputs without regard to past input states. In the video, it is explained as a type of logic that does not have memory. The focus is on devices like multiplexers, demultiplexers, encoders, and decoders, all of which fall under this category.

💡Sequential Logic

Sequential logic, unlike combinational logic, relies on both the current and past states of the inputs to determine the output. This type of logic includes memory, meaning the history of inputs affects the output. Though the video mainly focuses on combinational logic, sequential logic is mentioned as a topic for future discussion.

💡Multiplexer (MUX)

A multiplexer, or MUX, is a device that selects one input from multiple inputs and forwards it to the output based on control signals. In the video, the example of the 74157 chip is given, which is a 4-channel, 2-to-1 data selector MUX. Multiplexers are commonly used for routing signals efficiently in digital circuits.

💡Demultiplexer (DEMUX)

A demultiplexer, or DEMUX, operates as the reverse of a multiplexer by taking a single input and routing it to one of several outputs. The video describes DEMUX as a device that distributes data to multiple outputs, and like multiplexers, DEMUXes are controlled by selector pins.

💡Select Pin

The select pin in a multiplexer or demultiplexer is the control input that determines which channel or output is selected. In the example provided in the video, the select pin (pin 1) flips the switch between input A and input B in a multiplexer based on whether it is high or low.

💡Enable Pin

The enable pin is used to control whether a multiplexer or demultiplexer is active. In the 74157 multiplexer example, pin 15 serves as the enable pin. When it is low, the MUX is active and allows the output to be connected to the selected input; when it is high, the outputs are disabled.

💡Priority Encoder

A priority encoder assigns priority to inputs and outputs the binary representation of the highest-priority active input. In the video, it’s explained that priority encoders resolve conflicts when multiple inputs are active by giving precedence to the highest-priority input, such as in robotic control systems or keyboard encodings.

💡Binary Coded Decimal (BCD)

BCD is a system where each decimal digit is represented by its own 4-bit binary equivalent. The video discusses how BCD to seven-segment decoders are used to convert BCD values into signals that control which segments of an LED display are lit, allowing numeric values to be shown.

💡Decoder

A decoder is a device that takes binary input and converts it into a more readable or usable form, such as decimal or signals for a seven-segment display. In the video, decoders are described as performing the inverse of encoders by translating compact binary data into more expanded forms.

💡Seven-Segment Display

A seven-segment display is an electronic display device used to show decimal numerals. It consists of seven LEDs arranged in a pattern that can form numbers. The video explains how BCD to seven-segment decoders are used to control these displays, turning on specific segments to represent numbers like 0 or 1.

Highlights

Introduction to combinational and sequential logic, explaining that combinational logic outputs depend on the current state of inputs, while sequential logic considers both current and previous input states.

Overview of common combinational logic devices such as multiplexers (muxes), demultiplexers (demuxes), encoders, and decoders.

Multiplexers (MUX) are described as digitally controlled switches, allowing the selection of inputs based on the select pin and enable pin configuration.

Explanation of a 4-channel 2-to-1 data selector multiplexer (74LS157) with details on how inputs A and B, the select pin, and the enable pin affect the output.

Demonstration of different input combinations to show how the 74LS157 multiplexer selects inputs and outputs based on pin configuration.

Illustration of how multiplexers (MUX) can be 2-to-1, 4-to-1, or 8-to-1, with increasing numbers of selector pins as the number of inputs grows.

Explanation of demultiplexers (DEMUX) working in reverse of multiplexers by routing a single input to multiple outputs based on the state of the select pins.

Clarification on how MUX and DEMUX devices are 2^n devices, where n equals the number of select lines, such as 2-to-1 or 1-to-2, 4-to-1 or 1-to-4, etc.

Introduction to encoders and their role in translating multiple inputs into binary outputs, with examples of priority encoders that manage multiple active inputs.

Priority encoders explained with an example of active low devices, where higher-priority inputs override lower-priority ones.

Binary decoders explained, which convert binary inputs into other forms of data like decimal outputs.

Explanation of BCD (Binary Coded Decimal) and how it differs from binary, emphasizing its use in certain decoders like BCD-to-7-segment display decoders.

Seven-segment displays explained in terms of how BCD data is translated into segment control to display decimal numbers.

Highlight of BCD-to-decimal decoders with ten outputs for representing numbers 0 to 9.

Final summary emphasizes the differences between encoders (more inputs than outputs) and decoders (more outputs than inputs), using an analogy of file zipping and unzipping.

Transcripts

play00:00

the following program is brought to you

play00:02

by element14 the electronics community

play00:05

where you can connect and collaborate

play00:06

with top engineers from around the world

play00:08

join now at element14.com slash presents

play00:12

hi and welcome back to the learning

play00:14

circuit today we're continuing to talk

play00:16

about digital logic and learning about

play00:18

combinational logic devices logic device

play00:25

is more complex than individual logic

play00:27

aids can be described as combinational

play00:30

logic or sequential logic in

play00:32

combinational logic the output is a

play00:34

product of the current states of the

play00:36

inputs in sequential logic the output is

play00:40

dependent on the current state of its

play00:41

inputs but also the previous state of

play00:44

its inputs in a way so Cuenco logic has

play00:46

memory while combinational logic does

play00:48

not we'll get into sequential logic

play00:51

devices in a future episode

play00:52

the most common combinational logic

play00:54

devices are multiplexers demultiplexers

play00:57

encoders and decoders multiplexers

play01:06

sometimes called data selectors or muxes

play01:08

act as digitally controlled switches

play01:11

this 7 for LS 1 5 7 is a 4-channel 2 to

play01:16

1 data selector multiplexer you can see

play01:19

that there are 4 sets or channels that

play01:22

each have two inputs yielding one output

play01:24

at the bottom you can see pin 1 is

play01:27

select and pin 15 is enable let's talk

play01:31

about those there are effectively four

play01:33

things that affect the output on each

play01:35

Channel inputs a and B can be high one

play01:39

or low zero the select pin digitally it

play01:43

flips the switch between inputs a is

play01:46

selected when pin 1 is high B is

play01:49

selected when pin 1 is low the enable

play01:53

pin pin 15 can effectively connect or

play01:56

disconnect the outputs from the inputs

play01:58

the output is enabled if pin 15 is low

play02:01

or disabled when pin 15 is high so let's

play02:06

say pins 2 5 6 10 and 13 were all high

play02:10

and the other inputs are low

play02:13

if pin1 the select pen was high and the

play02:16

enable pin pin 15 was low all the A's

play02:20

would be selected and the output would

play02:22

be enabled pin 4 would be high pin 7

play02:25

would be high pin 9 would be low and pin

play02:28

12 would be low

play02:29

now if pin 1 was low and pin 15 was low

play02:33

all the B's would be selected and the

play02:36

output is still enabled pin 4 would be

play02:39

low pin 7 would be high pin 9 would be

play02:43

high and pin 12 would be high at any

play02:47

point if pin 15 goes high the outputs

play02:50

are disabled for this chip disabled

play02:53

means all the outputs go low no signal

play02:56

gets through from any input here's the

play02:58

logic diagram for this chip you can see

play03:01

the four different channels this MUX is

play03:03

2 2 1 so 2 inputs go to one output

play03:07

another type is the 4 to 1 multiplexer

play03:10

like you can see here each channel has

play03:12

four inputs one enable pin and one

play03:15

output the two selector pins affected

play03:18

both channels lastly there are 8 to 1

play03:21

muxes this one has 3 selectors that can

play03:25

focus on the state of a single input to

play03:27

determine the output while the state of

play03:29

the other inputs don't matter this MUX

play03:32

has two outputs one is the normal output

play03:35

Y the other is called not Y and gives

play03:38

you the option of the inverse of the

play03:40

first output demultiplexers or d Moxa's

play03:47

work like multiplexers in Reverse while

play03:50

a MUX takes multiple inputs and routes

play03:52

them to a single output D muxes take a

play03:56

single input and route them to multiple

play03:58

outputs muxes and D muxes are 2 to the N

play04:02

devices where n equals the number of

play04:04

select lines 2 to the first would be a 2

play04:08

to 1 MUX or 1 to 2 D MUX and each has

play04:12

one selector line a 2 to the second

play04:15

which equals 4 is a 4 to 1 MUX or a 1 to

play04:19

4 D MUX and each have 2 selector lines

play04:22

a two to the third which equals eight is

play04:25

an 8 to 1 MUX or a 1 to 8 D MUX and each

play04:29

have three selector lines in a

play04:32

demultiplexer the selector pins are used

play04:34

to determine which output is selected in

play04:36

this one to eight active Lodi MUX the

play04:40

states of the three selector lines

play04:42

determines which of the eight outputs is

play04:44

enabled in this one to two D max pin one

play04:48

is the selector s and pin three is the

play04:51

input a if the selector is low output y

play04:55

zero is enabled if the selector is high

play04:58

output y 1 is enabled muxes and D Max's

play05:02

transmit data from single inputs to

play05:04

single outputs and that data is

play05:06

typically logic level multiplexers and

play05:09

demultiplexers are used for more simple

play05:11

signal mapping for more specific

play05:13

applications encoders and decoders are

play05:16

used to translate one form of data into

play05:18

another binary encoders take the data at

play05:26

their inputs figure out what number it

play05:28

represents and then output that data as

play05:31

a binary code you can see here that

play05:34

input 0 yields an output of binary 0

play05:37

input 1 an output of binary 1 input to

play05:42

an output of binary to an input 3 and

play05:45

output of binary 3

play05:47

however if inputs 1 into we're both

play05:50

active their outputs could combine and

play05:53

appear the same as if just input 3 were

play05:55

active that could be problematic that

play05:58

problem can be solved by using a

play06:00

priority encoder in a priority encoder

play06:03

input pins have a priority range from

play06:07

highest to lowest this is an active low

play06:10

chip so you can see in the left eye I

play06:12

enable input pin column that the pin

play06:16

must be set low for the inputs to affect

play06:18

the output pin 7 has the highest

play06:22

priority and is active low so if it is

play06:25

set to low all the lower priority inputs

play06:28

are ignored as represented by the X's X

play06:32

means high or low because they don't

play06:34

matter

play06:35

now if input 5 was set low it wouldn't

play06:38

matter if pin 0 through 4 were high or

play06:40

low but pin 6 & 7 have to be set high

play06:45

effectively off if either input 6 or 7

play06:49

were to go low they would become the new

play06:51

priority and this state of 5 would no

play06:54

longer matter so the priority encoder

play06:57

takes the number at the input and

play06:58

outputs that number in binary since this

play07:01

is an active load device a binary one is

play07:04

represented as low not high when input 0

play07:08

is low the output is high high high

play07:11

which is a binary 0 when input 1 is low

play07:16

the output is high high-low binary 1

play07:20

when input 2 is low the output is high

play07:23

low high binary 2 and so on as long as

play07:29

one of the inputs is low that number is

play07:31

output in binary if no input is active

play07:34

then output is binary 0 priority

play07:38

encoders can be used in keyboards for

play07:41

positional control like in robot arms or

play07:43

a ship navigation or detecting

play07:45

interrupts when working with micro

play07:46

processors while binary encoders take

play07:54

data and translate it to its binary

play07:55

equivalent binary decoders take binary

play07:59

and translate it to other forms of data

play08:01

like decimal the combinations of low and

play08:04

high at the inputs determine which

play08:06

output line is supplied a signal sound

play08:09

familiar it should they're basically D

play08:12

multiplexers and you'll often find IC is

play08:14

labeled with both another common type of

play08:17

decoder translates BCD in order to

play08:20

control seven segment displays seven

play08:23

segment displays are used to display

play08:25

numbers by the use of seven LED lit

play08:27

segments each segment has one pin and

play08:30

can be sent signals high or low to turn

play08:33

them on or off in order to create each

play08:35

number you can see that to display the

play08:38

number is zero requires six segments to

play08:41

be on while the number one requires only

play08:44

two segments to be active binary is a

play08:47

base to

play08:48

as opposed to our common base-10 system

play08:50

so 5:00 in base 10 is 1 0 1 in binary

play08:56

BCD or binary coded decimal is similar

play09:00

to binary except it is broken down into

play09:02

four digit binary you can see this on

play09:06

the chart where binary would typically

play09:07

get to a fifth digit like four decimal

play09:10

number ten one zero one zero is not a

play09:14

valid BCD number any binary number above

play09:17

that are unused in BCD instead the

play09:21

number is carried over to the next set

play09:23

of four digit binary the first four

play09:26

digits resets to zero

play09:27

then begins counting up again so BCD to

play09:30

seven-segment decoders take four inputs

play09:33

of BCD data and translate it to seven

play09:35

outputs that control the segments of the

play09:38

display lastly there are also BCD to

play09:41

decimal decoders decimal is base 10

play09:44

counting

play09:45

so those decoders have ten outputs one

play09:47

for each numeral zero through nine one

play09:51

simple characteristic to note is that

play09:52

encoders have more inputs and outputs

play09:54

and decoders have more outputs than

play09:56

inputs think of it in terms of zip files

play10:00

encoders take the data and make it

play10:02

smaller

play10:02

Legg zipping a file decoders take the

play10:05

data and make it bigger like unzipping a

play10:08

file

play10:08

hopefully you understand these

play10:10

combinational logic devices better now

play10:12

and I didn't just confuse you further

play10:13

but if you do have questions or if you'd

play10:16

like to share more about muxes des muxes

play10:18

encoders and decoders post on the

play10:21

element14 community on element14.com

play10:23

forward slash the learning circuit happy

play10:26

learning

play10:27

[Music]

play10:31

you

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Digital LogicCombinational LogicMultiplexersDemultiplexersEncodersDecodersElectronicsCircuit LearningTech EducationLogic Devices
Benötigen Sie eine Zusammenfassung auf Englisch?