Introduction to Logic Circuit Design (University of Utah) - Encoder/Decoder (Lecture 15)
Overview
The lecture develops combinational logic design techniques, moving from binary decision diagrams and Shannon expansion to comparators, encoders, and decoders. It shows how variable choices in Shannon expansion map Boolean functions onto 2:1 multiplexers, how a 4-bit comparator uses bitwise equality and most-significant-bit-first comparison, and how encoder and decoder circuits translate between one-hot inputs and binary or one-hot outputs.
Key takeaways
- Shannon expansion turns a Boolean function into a MUX implementation: choose a variable as the select signal, then connect its zero and one cofactors to the data inputs.
- An ROBDD can reduce a decision diagram by merging equivalent leaves, merging isomorphic subgraphs, and removing tests whose outcomes do not affect the function.
- For a 4-bit equality comparator, XNOR each pair A_i and B_i, then AND the four results; equality requires every bit pair to match.
- An unsigned greater-than comparator must prioritize the most significant differing bit: A is greater when that bit has A_i = 1 and B_i = 0 while all more significant pairs are equal.
- A standard encoder assumes one active input among 2^n lines and outputs its n-bit index; a priority encoder resolves multiple active inputs by selecting the highest-priority one.
- An enabled n-to-2^n decoder selects one output for each binary input code, and its outputs can be suppressed by gating them with the enable signal.
Chapters
- A binary decision tree provides a fixed, general structure that can represent a function using a full sequence of decisions.
- A binary decision diagram derives a more compact structure through Shannon expansion, so different functions can require different numbers of multiplexers.
- An ROBDD reduces a diagram by merging equivalent leaves, merging isomorphic nodes, and eliminating redundant tests.
- The first synthesis examples use Shannon expansion to express a Boolean function in terms of one selected variable.
- A 2:1 multiplexer implements the expansion: the selected variable is the control, and the two cofactors connect to its data inputs.
- The lecture contrasts this method with organizing a truth table into groups of rows that share common behavior.
- A function of W1, W2, and W3 is implemented by expanding on W1, then implementing the resulting cofactors with additional 2:1 multiplexers.
- The cofactors W2W3 and W2 + W3 are used to illustrate how smaller functions become MUX data inputs.
- Expansion on another variable can realize each cofactor using one additional multiplexer, producing a nested MUX network.
- A second function is expanded first on W1, then on W2, showing how successive Shannon expansions determine the MUX hierarchy.
- The lecture factors expressions in the reverse direction of Shannon expansion to identify the cofactors associated with each control variable.
- Choosing a different expansion variable changes the network structure and can affect how many 2:1 MUXes are needed.
- The comparator example compares A3A2A1A0 with B3B2B1B0.
- Each bit pair is tested with XNOR, which is 1 when the corresponding A and B bits match.
- The overall equality output is the AND of the four bitwise equality results, so every pair must match.
- For unsigned 4-bit values, comparison proceeds from the most significant bit, A3 and B3, toward A0 and B0.
- A is greater when the first differing bit pair has A_i = 1 and B_i = 0, provided all more significant pairs are equal.
- The greater-than function is an OR of these mutually prioritized cases, with equality of preceding bits included in each case.
- A standard encoder maps 2^n input lines to n binary output bits; a 16-input encoder, for example, has 4 output bits.
- Each output represents the index of the asserted input line when exactly one input is active.
- The input-to-index relationship can be tabulated and converted into Boolean equations for implementation.
- A priority encoder defines an output when multiple inputs are active by selecting the input with the highest assigned priority.
- The index reported by a priority encoder identifies the highest-priority asserted input, rather than treating all asserted inputs equally.
- A validity-style output distinguishes whether an input condition is present from cases where no input is active.
- A decoder maps n input bits to as many as 2^n output lines, with one output selected for each binary input code.
- An enable input makes the decoder operate when enable is 1 and suppresses its outputs when enable is 0.
- Enable can be incorporated into the output logic by gating each decoded output with the same enable signal.
- The lecture builds a 3-to-8 decoder from smaller decoder blocks and additional logic.
- For each 3-bit input code, the corresponding output Y0 through Y7 is selected when the decoder is enabled.
- The truth table provides a direct check that each input combination activates the matching output line.
- A decoder can be used wherever a small binary input must select among a larger number of outputs, including display-related logic.
- The 4-to-16 example uses four input bits to select one of sixteen output lines.
- The output selected by a given input code can be determined by reading that code as a binary index.
- The final examples trace input combinations through the 4-to-16 decoder and identify which output line is selected.
- With enable asserted, the binary input selects its corresponding output; changing the input changes the selected line.
- The lecture closes after completing the decoder examples and notes that the chapter’s material is covered.
Transcript excerpt
0:09 Good afternoon everyone. I hope you are doing well. Last lecture at the end of the lecture we started chapter but I realized that there are a few concepts from chapter that we haven gone through. So today we gna finish them up and then if you find time we gna continue chapter 5 and the memory section. So lab two and homework one of your homework would be the deadline of that would be this upcoming Sunday. So don't forget that. All right. So we have been talking about this but just emphas on slide about the binary decision diagram terminology.
0:59 one we have binary decision 3 okay who knows what is the differ between binary decision and binary decision diagram what was the difference so binary decision was general format that we have been applying from the always for variables او always structure this is binary decision from table and unique structure we don't change it no matter that what your circuit is always we have the same
1:48 number of multiplexers the same number of everything okay it contains are decision FPG basically called look up table because of it looks at the table the lookup table and general format so no matter do you agree that with this structure I can implement all three variable variabl from that decision no matter what my circ I can create with
2:39 only changing and here okay I can have the implementation the max implementation of that that's what we are using it in FPJ in FPJ we cannot change the structure basically at every binary decision binary decision diagram was the one that we have been driving from the expansion okay it was the more simplified version if you remember we have been practicing that that once for three variables and we gna
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, MEDAL-Research.