DOC PREVIEW
U of I CS 231 - Basic circuit analysis and design

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

January 28, 2002 Basic circuit analysis and design 1Basic circuit analysis and design• In the first two weeks we 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.• Today we’ll put all of these foundations to good use, to analyze anddesign some larger circuits.January 28, 2002 Basic circuit analysis and design 2Circuit analysis• Circuit analysis involves figuring out what some circuit does.– Every circuit computes some function, which can be described withBoolean 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 theoverall circuit are.– This step is often overlooked!– The example circuit here has three inputs x, y, z and one output f.January 28, 2002 Basic circuit analysis and design 3Write algebraic expressions...• Next, write expressions for the outputs of each individual gate, basedon 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’January 28, 2002 Basic circuit analysis and design 4...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 possibleinput 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 = 8rows. All the possible input combinations are shown.x y z f000001010011100101110111January 28, 2002 Basic circuit analysis and design 5Simulating the circuit• Then you can simulate the circuit, either by hand or with a program likeLogicWorks, 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 f0000010100111001011110111101100110 1January 28, 2002 Basic circuit analysis and design 6Finishing the truth table• Doing the same thing for all the other input combinations yields thecomplete truth table.• This is simple, but tedious.x y z f0000001 1010101101000101111001111January 28, 2002 Basic circuit analysis and design 7Expressions and truth tables• Remember from the second lecture that if you already have a Booleanexpression, you can use that to easily make a truth table.• For example, since we already found that the circuit computes thefunction f(x,y,z) = xz + y’z + x’yz’, we can use that to fill in a table:– We show intermediate columns for the terms xz, y’z and x’yz’.– Then, f is obtained by just OR’ing the intermediate columns.x y z xz y’z x’yz’ f000 0 0 0 0001 0 1 0 1010 0 0 1 1011 0 0 0 0100 0 0 0 0101 1 1 0 1110 0 0 0 0111 1 0 0 1January 28, 2002 Basic circuit analysis and design 8Truth tables and expressions• The opposite is also true: it’s easy to come up with an expression if youalready have a truth table.• In the second lecture, we saw that you can quickly convert a truth tableinto a sum of minterms expression. The minterms correspond to thetruth table rows where the output is 1.• You can then simplify this sum of minterms if desired—using a K-map,for example.x y z f0000001 1010101101000101111001111f(x,y,z) = x’y’z + x’yz’ + xy’z + xyz= m1 + m2 + m5 + m7January 28, 2002 Basic circuit analysis and design 9Circuit analysis summary• After finding the circuit inputs and outputs, you can come up witheither an expression or a truth table to describe what the circuit does.• You can easily convert between expressions and truth tables.Find the circuit’sinputs and outputsFind a Booleanexpressionfor the circuitFind a truth tablefor the circuitJanuary 28, 2002 Basic circuit analysis and design 10Basic circuit design• The goal of circuit design is to build hardware that computes somegiven function.• The basic idea is to write the function as a Boolean expression, andthen convert that to a circuit.Step 1:Figure out how many inputs and outputs you have.Step 2:Make sure you have a description of the function, either as atruth table or a Boolean expression.Step 3:Convert this into a simplified Boolean expression. (For CS231,we typically expect you to find MSPs unless otherwise stated.)Step 4:Build the circuit based on your simplified expression.January 28, 2002 Basic circuit analysis and design 11Design example: Comparing 2-bit numbers• Let’s design a circuit that compares two 2-bit numbers, A and B. Thecircuit should have three outputs:– G (“Greater”) should be 1 only when A > B.– E (“Equal”) should be 1 only when A = B.– L (“Lesser”) should be 1 only when A < B.• Make sure you understand the problem.– Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal).– For any inputs A and B, exactly one of the three outputs will be 1.January 28, 2002 Basic circuit analysis and design 12Step 1: How many inputs and outputs?• Two 2-bit numbers means a total of four inputs.– We should name each of them.– Let’s say the first number consists of digits A1 and A0 from left toright, and the second number is B1 and B0.• The problem specifies three outputs: G, E and L.• Here is a block diagram that shows the inputs and outputs explicitly.• Now we just have to design the circuitry that goes into the box.January 28, 2002 Basic circuit analysis and design 13Step 2: Functional specification• For this problem, it’s probably easiestto start with a truth table. This way,we can explicitly show the relationship(>, =, <) between inputs.• A four-input function has a sixteen-row truth table.• It’s usually clearest to put the truthtable rows in binary numeric order; inthis case, from 0000 to 1111 for A1,A0, B1 and B0.• Example: 01 < 10, so the sixth row ofthe truth table (corresponding toinputs A=01 and B=10) shows thatoutput L=1, while G and E are both 0.A1 A0 B1 B0 G E L0000010000100100100010011001010010001010100110001011100110001001001 10010100101011001110010011011001 110 1001111010January 28, 2002 Basic circuit


View Full Document

U of I CS 231 - Basic circuit analysis and design

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 Basic circuit analysis and design
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 Basic circuit analysis and design 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 Basic circuit analysis and design 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?