Unformatted text preview:

I don’t care!Example: Seven Segment DisplaySlide 3Practice K-map 3Solutions for practice K-map 3K-map SummaryBasic circuit analysis and designCircuit analysisWrite algebraic expressions......or make a truth tableSimulating the circuitFinishing the truth tableExpressions and truth tablesTruth tables and expressionsCircuit analysis summaryBasic circuit designDesign example: Comparing 2-bit numbersStep 1: How many inputs and outputs?Step 2: Functional specificationSlide 20Step 3: Simplified Boolean expressionsStep 4: Drawing the circuitsTesting this in LogicWorksExample wrap-upSummary01/14/19Basic circuit analysis and design 1I don’t care!•You don’t always need all 2n input combinations in an n-variable function.–If you can guarantee that certain input combinations never occur.–If some outputs aren’t used in the rest of the circuit.•We mark don’t-care outputs in truth tables and K-maps with Xs.•Within a K-map, each X can be considered as either 0 or 1. You should pick the interpretation that allows for the most simplification.x y z f (x,y,z)0 0 0 00 0 1 10 1 0 X0 1 1 01 0 0 01 0 1 11 1 0 X1 1 1 101/14/19Basic circuit analysis and design 2Example: Seven Segment DisplayA B C D e00 0 0 0 110 0 0 1 020 0 1 0 130 0 1 1 040 1 0 0 050 1 0 1 060 1 1 0 170 1 1 1 081 0 0 0 191 0 0 1 0XXXXXXXXXXXXebafgcdTable for eCDAB00 01 11 1000 1 0 0 101 0 0 0 111 X X X X10 1 0 X XCD’ + B’D’Assumption: Input represents a legal digit (0-9)Input: digit encoded as 4 bits: ABCD01/14/19Basic circuit analysis and design 3Example: Seven Segment DisplayA B C D a00 0 0 0 110 0 0 1 020 0 1 0 130 0 1 1 140 1 0 0 050 1 0 1 160 1 1 0 170 1 1 1 181 0 0 0 191 0 0 1 1XXXXXXXXXXXXafgebcdTable for aCDAB00 01 11 1000 1 1 101 1 1 111 X X X X10 1 1 X XA + C + BD + B’D’The expression in book (p 110) is different because it assumes “0” for “illegal” inputs: A’C+A’BD+B’C’D’+AB’C’01/14/19Basic circuit analysis and design 4 Y 1 0 0 1 1 1 x 0 0 x 1 1 X W 1 0 0 x Z Practice K-map 3•Find a MSP forf(w,x,y,z) = m(0,2,4,5,8,14,15), d(w,x,y,z) = m(7,10,13)This notation means that input combinations wxyz = 0111, 1010 and 1101 (corresponding to minterms m7, m10 and m13) are unused.01/14/19Basic circuit analysis and design 5 Y 1 0 0 1 1 1 x 0 X W 0 x 1 1 1 0 0 x Z Solutions for practice K-map 3•Find a MSP for:f(w,x,y,z) = m(0,2,4,5,8,14,15), d(w,x,y,z) = m(7,10,13)All prime implicants are circled. We can treat X’s as 1s if we want, so the red group includes two X’s, and the light blue group includes one X.The only essential prime implicant is x’z’. The red group is not essential because the minterms in it also appear in other groups.The MSP is x’z’ + wxy + w’xy’. It turns out the red group is redundant; we can cover all of the minterms in the map without it.01/14/19Basic circuit analysis and design 6K-map Summary•K-maps are an alternative to algebra for simplifying expressions.–The result is a minimal sum of products, which leads to a minimal two-level circuit.–It’s easy to handle don’t-care conditions.–K-maps are really only good for manual simplification of small expressions... but that’s good enough for CS231!•Things to keep in mind:–Remember the correct order of minterms on the K-map.–When grouping, you can wrap around all sides of the K-map, and your groups can overlap.–Make as few rectangles as possible, but make each of them as large as possible. This leads to fewer, but simpler, product terms.–There may be more than one valid solution.01/14/19Basic circuit analysis and design 7Basic circuit analysis and design•We have learned all the prerequisite material:–Truth tables and Boolean expressions describe functions.–Expressions can be converted into hardware circuits.–Boolean algebra and K-maps help simplify expressions and circuits.•Now, let us put all of these foundations to good use, to analyze and design some larger circuits.01/14/19Basic circuit analysis and design 8Circuit analysis•Circuit analysis involves figuring out what some circuit does.–Every circuit computes some function, which can be described with Boolean expressions or truth tables.–So, the goal is to find an expression or truth table for the circuit.•The first thing to do is figure out what the inputs and outputs of the overall circuit are.–This step is often overlooked!–The example circuit here has three inputs x, y, z and one output f.01/14/19Basic circuit analysis and design 9Write algebraic expressions...•Next, write expressions for the outputs of each individual gate, based on that gate’s inputs.–Start from the inputs and work towards the outputs.–It might help to do some algebraic simplification along the way.•Here is the example again.–We did a little simplification for the top AND gate.–You can see the circuit computes f(x,y,z) = xz + y’z + x’yz’01/14/19Basic circuit analysis and design 10...or make a truth table•It’s also possible to find a truth table directly from the circuit. •Once you know the number of inputs and outputs, list all the possible input combinations in your truth table.–A circuit with n inputs should have a truth table with 2n rows.–Our example has three inputs, so the truth table will have 23 = 8 rows. All the possible input combinations are shown.x y z f0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 101/14/19Basic circuit analysis and design 11Simulating the circuit•Then you can simulate the circuit, either by hand or with a program like LogicWorks, to find the output for each possible combination of inputs.•For example, when xyz = 101, the gate outputs would be as shown below.–Use truth tables for AND, OR and NOT to find the gate outputs.–For the final output, we find that f(1,0,1) = 1. x y z f0 0 00 0 10 1 00 1 11 0 01 0 1 11 1 01 1 1101100110 101/14/19Basic circuit analysis and design 12Finishing the truth table•Doing the same thing for all the other input combinations yields the complete truth table.•This is simple, but tedious.x y z f0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 01 0 1 11 1 0 01 1 1 101/14/19Basic circuit analysis and design 13Expressions and truth tables•Remember that if you already have a Boolean expression, you can use that to easily make a truth table.•For example, since we already found that the circuit computes the function f(x,y,z) = xz + y’z + x’yz’, we can use that


View Full Document

U of I CS 231 - Lecture notes

Documents in this Course
Counters

Counters

23 pages

Latches

Latches

22 pages

Lecture

Lecture

33 pages

Lecture

Lecture

16 pages

Lecture

Lecture

4 pages

Datapaths

Datapaths

30 pages

Lecture

Lecture

6 pages

Registers

Registers

17 pages

Datapaths

Datapaths

28 pages

Decoders

Decoders

20 pages

Load more
Download Lecture notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?