Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 352 Digital System Fundamentals

Similar presentations


Presentation on theme: "ECE 352 Digital System Fundamentals"— Presentation transcript:

1 ECE 352 Digital System Fundamentals
Don’t-Cares In this presentation, we will introduce the concept of don’t-care conditions, and how they can be used in circuit optimization.

2 Don’t-Cares Don’t-care Conditions
For some circuits, we may know that some input combinations will never occur Sometimes it doesn’t matter what the output is for certain input combinations that can occur In either case, we don’t care what the output is for some input combinations Can use this info to help simplify logic We can choose outputs to be either 1 or 0 for those input combinations, since it doesn’t matter We can choose values for these outputs in a way to help us minimize the K-map more efficiently There are two possibilities that give rise to don’t-care conditions. First, in some cases, we may know that certain combinations of input values will never occur. We’ll see a classic example of that later. Second, it may not matter what the output is for some input sets, because we aren’t using the output of the logic in those circumstances. In both cases, the result is that we “don’t care” what the output is for these input sets. Since we don’t care, we will choose to make the output values be whatever will best help us minimize the K-map, and thus create a simpler circuit.

3 Using Don’t-Cares in K-Maps
X represents “don’t-care” locations K-map groupings can include X’s X’s do not have to be covered with groupings Notes: The “don’t-care” X is not an output value The actual output will be a 1 or a 0 based on grouping 1 if in a group 0 if not in a group Do not add more implicants just to cover X’s Makes hardware bigger and more complex than necessary We do not need to force those minterms to be 1 – we can choose to make them be 0! In a K-map, we use the symbol X to represent the output of don’t-care conditions. K-map groupings CAN cover X’s, but they don’t have to. It is important to recognize that the X is NOT an output value – it’s a visual cue to remind us that we get to choose the output value for that square when we are solving the K-map. The actual output of the function and circuit will always be a 1 or a 0. If we include a group that covers an X in our solution, then we have decided to make the output be 1 for that input combination. Remember – product terms included in a solution produce a 1 for all minterms that they cover. If we end up not including a particular X in any of the solution’s groups, then we have decided the output will be 0 for that case. When working with don’t-cares, remember that the real goal is to cover the 1s. Covering Xs is only useful when it improves our ability to cover 1s with fewer or larger implicants. Never add implicants just to cover Xs – we can choose instead to make those outputs be 0 and reduce the complexity of the solution.

4 Don’t-Cares: 7-Segment Decoder
Many displays are LEDs arranged in “segments” Ovens, alarm clocks, DVD players, speedometers, etc. Lighting different segments forms different shapes A common type is a 7-segment display Often used for displaying numbers 0-9 Need a logic function to control each segment based on a four-bit BCD value 7 segments  7 logic functions If the input is a BCD digit, perhaps we “don’t care” what is displayed for values 0xA through 0xF Let’s look at a common example where digital designers encounter don’t-care conditions: output displays. Many displays are constructed from multiple lights – often LEDs – that can be individually controlled. You may have noticed these in many common devices and appliances. One particularly common display of this type is constructed with seven LED segments. This type of display is used to show a decimal digit, and multiple of these are often used together on ovens, clocks, and other devices. To control the display, we need to construct seven different logic functions, each of which controls one of the segments. Generally, the input to these functions is a 4-bit BCD value. In that case, we may not care what is displayed for input values 10 through 15 since these are not valid BCD values, and thus should not occur.

5 Don’t-Cares: 7-Segment Decoder
Assume 1 is on, 0 is off—unless told otherwise! “Active high” – it is “active” when the input is 1 “Active low” – it is “active” when the input is 0 Example: ACTIVE LOW Find SoP equation E(D3,D2,D1,D0) for bottom-left segment E E = 0 for 0, 2, 6, 8 E = 1 for other valid BCD values Don’t care what E is for invalid BCD values 0xA – 0xF We call the logic used to control this display a “decoder”, since it takes a code (the 4-bit BCD signal) and determines from that code whether each segment should be ON or OFF. But what value do we need to give a segment to turn it ON vs. turn it OFF? If we use a digital logic signal to turn a physical device ON and OFF, we generally assume that a logic 1 corresponds to ON (or active) and a logic 0 corresponds to OFF (or inactive). However, for various reasons, it may sometimes be the opposite. We can describe both situations using some easy terminology. If a 1 makes the device “active” (in this case, turns ON the LED), we call that “active high” because we think of a 1 as “high” and a 0 as “low”. In this case, the device would be inactive for a “low” input value of 0. If instead the device is active in response to a 0, and inactive for a 1, we call that “active low”. It is active when the input is low. Let’s look at an example. Assume that this 7-segment display is active low, so we need to send a segment a 0 to turn it ON, and a 1 to turn it OFF. We’ll look at the segment in the lower left – the one with the black outline – and we’ll call this segment “E”. Looking at how we want to display the ten possible digits that we care about, we see that we want segment E to be ON for values 0, 2, 6, and 8, and that it should be OFF for values 1, 3, 4, 5, 7, and 9. However, we don’t care whether segment E is ON or OFF for input values 10 through 15, since these values should never be applied to the decoder inputs.

6 Don’t-Cares: 7-Segment Decoder
D1D0 Can go straight to the K-map since it is a truth table… Enter 0 in K-map for D = 0000, 0010, and 0110, 1000 Enter 1 for all other valid BCD values Enter X (don’t-care) for all invalid BCD values 00 01 11 10 D3D2 00 1 1 01 1 1 1 11 X X X X 10 1 X X Based on the diagram on the previous slide, we can directly enter the truth table data into the K-map, using Xs as placeholders for all of the don’t-care conditions. Then we use the don’t-cares to make our groupings as large as possible. First, we can create a group of size 8 from the two inner columns. Then we can create a group of size 4 to cover the remaining 1. After all 1s are covered, we’re done! We don’t want to cover the remaining two don’t-cares because we don’t need to. E = D0 + D2 D1

7 Don’t-Cares: 7-Segment Decoder
D1D0 An “X” is not a value in digital logic We only use it as a placeholder here! Don’t-cares that are in a group become 1s in the function Don’t-cares that not in any group become 0s in the function 00 01 11 10 D3D2 00 1 1 01 1 1 1 11 1 X 1 X X 1 X 10 1 1 X X Remember that the don’t-care symbol X is just a placeholder. The output of the optimized function must always be either a 0 or a 1, depending on the input values. Also, remember that we can only include 1s in groups, and that 0s cannot be included in any group. So, if we include any don’t-cares in the solution’s implicants, then we have decided that the output value will be 1 for those input combinations. If don’t-cares are not included in the solution’s implicants, then we have decided that those output values will be 0. We use the flexibility provided by don’t-cares to help us create smaller, more efficient hardware. E = D0 + D2 D1

8 ECE 352 Digital System Fundamentals
Don’t-Cares This concludes our video on using don’t-care conditions.


Download ppt "ECE 352 Digital System Fundamentals"

Similar presentations


Ads by Google