How Combinational Logic Devices Work - The Learning Circuit
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
🔧 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.
🔠 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.
📁 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
💡Sequential Logic
💡Multiplexer (MUX)
💡Demultiplexer (DEMUX)
💡Select Pin
💡Enable Pin
💡Priority Encoder
💡Binary Coded Decimal (BCD)
💡Decoder
💡Seven-Segment Display
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
the following program is brought to you
by element14 the electronics community
where you can connect and collaborate
with top engineers from around the world
join now at element14.com slash presents
hi and welcome back to the learning
circuit today we're continuing to talk
about digital logic and learning about
combinational logic devices logic device
is more complex than individual logic
aids can be described as combinational
logic or sequential logic in
combinational logic the output is a
product of the current states of the
inputs in sequential logic the output is
dependent on the current state of its
inputs but also the previous state of
its inputs in a way so Cuenco logic has
memory while combinational logic does
not we'll get into sequential logic
devices in a future episode
the most common combinational logic
devices are multiplexers demultiplexers
encoders and decoders multiplexers
sometimes called data selectors or muxes
act as digitally controlled switches
this 7 for LS 1 5 7 is a 4-channel 2 to
1 data selector multiplexer you can see
that there are 4 sets or channels that
each have two inputs yielding one output
at the bottom you can see pin 1 is
select and pin 15 is enable let's talk
about those there are effectively four
things that affect the output on each
Channel inputs a and B can be high one
or low zero the select pin digitally it
flips the switch between inputs a is
selected when pin 1 is high B is
selected when pin 1 is low the enable
pin pin 15 can effectively connect or
disconnect the outputs from the inputs
the output is enabled if pin 15 is low
or disabled when pin 15 is high so let's
say pins 2 5 6 10 and 13 were all high
and the other inputs are low
if pin1 the select pen was high and the
enable pin pin 15 was low all the A's
would be selected and the output would
be enabled pin 4 would be high pin 7
would be high pin 9 would be low and pin
12 would be low
now if pin 1 was low and pin 15 was low
all the B's would be selected and the
output is still enabled pin 4 would be
low pin 7 would be high pin 9 would be
high and pin 12 would be high at any
point if pin 15 goes high the outputs
are disabled for this chip disabled
means all the outputs go low no signal
gets through from any input here's the
logic diagram for this chip you can see
the four different channels this MUX is
2 2 1 so 2 inputs go to one output
another type is the 4 to 1 multiplexer
like you can see here each channel has
four inputs one enable pin and one
output the two selector pins affected
both channels lastly there are 8 to 1
muxes this one has 3 selectors that can
focus on the state of a single input to
determine the output while the state of
the other inputs don't matter this MUX
has two outputs one is the normal output
Y the other is called not Y and gives
you the option of the inverse of the
first output demultiplexers or d Moxa's
work like multiplexers in Reverse while
a MUX takes multiple inputs and routes
them to a single output D muxes take a
single input and route them to multiple
outputs muxes and D muxes are 2 to the N
devices where n equals the number of
select lines 2 to the first would be a 2
to 1 MUX or 1 to 2 D MUX and each has
one selector line a 2 to the second
which equals 4 is a 4 to 1 MUX or a 1 to
4 D MUX and each have 2 selector lines
a two to the third which equals eight is
an 8 to 1 MUX or a 1 to 8 D MUX and each
have three selector lines in a
demultiplexer the selector pins are used
to determine which output is selected in
this one to eight active Lodi MUX the
states of the three selector lines
determines which of the eight outputs is
enabled in this one to two D max pin one
is the selector s and pin three is the
input a if the selector is low output y
zero is enabled if the selector is high
output y 1 is enabled muxes and D Max's
transmit data from single inputs to
single outputs and that data is
typically logic level multiplexers and
demultiplexers are used for more simple
signal mapping for more specific
applications encoders and decoders are
used to translate one form of data into
another binary encoders take the data at
their inputs figure out what number it
represents and then output that data as
a binary code you can see here that
input 0 yields an output of binary 0
input 1 an output of binary 1 input to
an output of binary to an input 3 and
output of binary 3
however if inputs 1 into we're both
active their outputs could combine and
appear the same as if just input 3 were
active that could be problematic that
problem can be solved by using a
priority encoder in a priority encoder
input pins have a priority range from
highest to lowest this is an active low
chip so you can see in the left eye I
enable input pin column that the pin
must be set low for the inputs to affect
the output pin 7 has the highest
priority and is active low so if it is
set to low all the lower priority inputs
are ignored as represented by the X's X
means high or low because they don't
matter
now if input 5 was set low it wouldn't
matter if pin 0 through 4 were high or
low but pin 6 & 7 have to be set high
effectively off if either input 6 or 7
were to go low they would become the new
priority and this state of 5 would no
longer matter so the priority encoder
takes the number at the input and
outputs that number in binary since this
is an active load device a binary one is
represented as low not high when input 0
is low the output is high high high
which is a binary 0 when input 1 is low
the output is high high-low binary 1
when input 2 is low the output is high
low high binary 2 and so on as long as
one of the inputs is low that number is
output in binary if no input is active
then output is binary 0 priority
encoders can be used in keyboards for
positional control like in robot arms or
a ship navigation or detecting
interrupts when working with micro
processors while binary encoders take
data and translate it to its binary
equivalent binary decoders take binary
and translate it to other forms of data
like decimal the combinations of low and
high at the inputs determine which
output line is supplied a signal sound
familiar it should they're basically D
multiplexers and you'll often find IC is
labeled with both another common type of
decoder translates BCD in order to
control seven segment displays seven
segment displays are used to display
numbers by the use of seven LED lit
segments each segment has one pin and
can be sent signals high or low to turn
them on or off in order to create each
number you can see that to display the
number is zero requires six segments to
be on while the number one requires only
two segments to be active binary is a
base to
as opposed to our common base-10 system
so 5:00 in base 10 is 1 0 1 in binary
BCD or binary coded decimal is similar
to binary except it is broken down into
four digit binary you can see this on
the chart where binary would typically
get to a fifth digit like four decimal
number ten one zero one zero is not a
valid BCD number any binary number above
that are unused in BCD instead the
number is carried over to the next set
of four digit binary the first four
digits resets to zero
then begins counting up again so BCD to
seven-segment decoders take four inputs
of BCD data and translate it to seven
outputs that control the segments of the
display lastly there are also BCD to
decimal decoders decimal is base 10
counting
so those decoders have ten outputs one
for each numeral zero through nine one
simple characteristic to note is that
encoders have more inputs and outputs
and decoders have more outputs than
inputs think of it in terms of zip files
encoders take the data and make it
smaller
Legg zipping a file decoders take the
data and make it bigger like unzipping a
file
hopefully you understand these
combinational logic devices better now
and I didn't just confuse you further
but if you do have questions or if you'd
like to share more about muxes des muxes
encoders and decoders post on the
element14 community on element14.com
forward slash the learning circuit happy
learning
[Music]
you
5.0 / 5 (0 votes)