Basic circuit analysis and design. Circuit analysis. Write algebraic expressions or make a truth table

Similar documents
Review: Standard forms of expressions

Standard Forms of Expression. Minterms and Maxterms

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Boolean algebra. June 17, Howard Huang 1

Circuit analysis summary

Spring 2010 CPE231 Digital Logic Section 1 Quiz 1-A. Convert the following numbers from the given base to the other three bases listed in the table:

Arithmetic-logic units

Simplification of Boolean Functions

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Digital Logic Lecture 7 Gate Level Minimization

QUESTION BANK FOR TEST

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Digital Circuits ECS 371

Lecture 5. Chapter 2: Sections 4-7

Experiment 3: Logic Simplification

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

Simplification of Boolean Functions

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

Introduction to Boolean logic and Logical Gates

Gate Level Minimization Map Method

ENGIN 112 Intro to Electrical and Computer Engineering

Chapter 2 Combinational Logic Circuits

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

CSE 20. Lecture 4: Number System and Boolean Function. CSE 20: Lecture2

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2006

Chapter 3. Boolean Algebra and Digital Logic

CprE 281: Digital Logic

Announcements. Chapter 2 - Part 1 1

Code No: R Set No. 1

2.1 Binary Logic and Gates

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2008

ELCT201: DIGITAL LOGIC DESIGN

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Contents. Chapter 3 Combinational Circuits Page 1 of 34

Chapter 2: Combinational Systems

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

LOGIC CIRCUITS. Kirti P_Didital Design 1

Boolean Logic CS.352.F12

LECTURE 4. Logic Design

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Chapter 4. Combinational Logic. Dr. Abu-Arqoub

CS February 17

Binary Adders: Half Adders and Full Adders

2/8/2017. SOP Form Gives Good Performance. ECE 120: Introduction to Computing. K-Maps Can Identify Single-Gate Functions

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

Unit-IV Boolean Algebra

LAB #3: ADDERS and COMPARATORS using 3 types of Verilog Modeling

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

Propositional Calculus. Math Foundations of Computer Science

IT 201 Digital System Design Module II Notes

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

2.6 BOOLEAN FUNCTIONS

ECE380 Digital Logic

Code No: R Set No. 1

Module -7. Karnaugh Maps

Code No: R Set No. 1

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

(Refer Slide Time 6:48)

Outcomes. Unit 9. Logic Function Synthesis KARNAUGH MAPS. Implementing Combinational Functions with Karnaugh Maps

Question Total Possible Test Score Total 100

Karnaugh Maps. Kiril Solovey. Tel-Aviv University, Israel. April 8, Kiril Solovey (TAU) Karnaugh Maps April 8, / 22

Gate-Level Minimization

Chapter 3. Gate-Level Minimization. Outlines

Gate-Level Minimization. section instructor: Ufuk Çelikcan

UNIT II. Circuit minimization

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

Combinational Circuits Digital Logic (Materials taken primarily from:

Combinational Circuits

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1.

ENGIN 112. Intro to Electrical and Computer Engineering

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Lecture 4: Implementation AND, OR, NOT Gates and Complement

Chapter 2 Combinational

Incompletely Specified Functions with Don t Cares 2-Level Transformation Review Boolean Cube Karnaugh-Map Representation and Methods Examples

Chapter 2 Boolean algebra and Logic Gates

Combinational Logic & Circuits

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

Computer Organization

Permutation Matrices. Permutation Matrices. Permutation Matrices. Permutation Matrices. Isomorphisms of Graphs. 19 Nov 2015

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

CMPE223/CMSE222 Digital Logic

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

1. Mark the correct statement(s)

Gate-Level Minimization

X Y Z F=X+Y+Z

DKT 122/3 DIGITAL SYSTEM 1

EEE130 Digital Electronics I Lecture #4_1

Gate Level Minimization

Gate-Level Minimization

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

ELCT201: DIGITAL LOGIC DESIGN

COMBINATIONAL LOGIC CIRCUITS

Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

Computer Organization and Levels of Abstraction

Gate-Level Minimization

Code No: 07A3EC03 Set No. 1

Transcription:

Basic circuit analysis and design Circuit 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. 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 and design some larger circuits. January 28, 22 Basic circuit analysis and design January 28, 22 Basic circuit analysis and design 2 Write 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...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 2 n rows. Our example has three inputs, so the truth table will have 2 3 = 8 rows. All the possible input combinations are shown. January 28, 22 Basic circuit analysis and design 3 January 28, 22 Basic circuit analysis and design 4

Simulating 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 =, 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(,,) =. Finishing the truth table Doing the same thing for all the other input combinations yields the complete truth table. This is simple, but tedious. January 28, 22 Basic circuit analysis and design 5 January 28, 22 Basic circuit analysis and design 6 Expressions and truth tables Remember from the second lecture 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 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 f Truth tables and expressions The opposite is also true: it s easy to come up with an expression if you already have a truth table. In the second lecture, we saw that you can quickly convert a truth table into a sum of minterms expression. The minterms correspond to the truth table rows where the output is. f(x,y,z) = x y z + x yz + xy z + xyz = m + m 2 + m 5 + m 7 You can then simplify this sum of minterms if desired using a K-map, for example. January 28, 22 Basic circuit analysis and design 7 January 28, 22 Basic circuit analysis and design 8

Circuit analysis summary After finding the circuit inputs and outputs, you can come up with either an expression or a truth table to describe what the circuit does. You can easily convert between expressions and truth tables. Find a Boolean expression for the circuit Find the circuit s inputs and outputs Find a truth table for the circuit Basic circuit design The goal of circuit design is to build hardware that computes some given function. The basic idea is to write the function as a Boolean expression, and then convert that to a circuit. Step : Figure out how many inputs and outputs you have. Step 2: Make sure you have a description of the function, either as a truth table or a Boolean expression. Step 3: Convert this into a simplified Boolean expression. (For CS23, we typically expect you to find MSPs unless otherwise stated.) Step 4: Build the circuit based on your simplified expression. January 28, 22 Basic circuit analysis and design 9 January 28, 22 Basic circuit analysis and design Design example: Comparing 2-bit numbers Let s design a circuit that compares two 2-bit numbers, A and B. The circuit should have three outputs: G ( Greater ) should be only when A > B. E ( Equal ) should be only when A = B. L ( Lesser ) should be only when A < B. Make sure you understand the problem. Inputs A and B will be,,, or (,, 2 or 3 in decimal). For any inputs A and B, exactly one of the three outputs will be. Step : 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 A and A from left to right, and the second number is B and B. 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, 22 Basic circuit analysis and design January 28, 22 Basic circuit analysis and design 2

Step 2: Functional specification Step 3: Simplified Boolean expressions For this problem, it s probably easiest to start with a truth table. This way, we can explicitly show the relationship (>, =, <) between inputs. A four-input function has a sixteenrow truth table. It s usually clearest to put the truth table rows in binary numeric order; in this case, from to for A, A, B and B. Example: <, so the sixth row of the truth table (corresponding to inputs A= and B=) shows that output L=, while G and E are both. A A B B G E L A Let s use K-maps. There are three functions (each with the same inputs A A B B), so we need three K-maps. B B A G(A,A,B,B) = A A B + A B B + A B A B A B E(A,A,B,B) = A A B B + A A B B + A A B B + A A B B A B A B L(A,A,B,B) = A A B + A B B + A B January 28, 22 Basic circuit analysis and design 3 January 28, 22 Basic circuit analysis and design 4 Step 4: Drawing the circuits Testing this in LogicWorks G = A A B + A B B + A B E = A A B B + A A B B + A A B B + A A B B L = A A B + A B B + A B Where do the inputs come from? Binary switches, in LogicWorks How do you view outputs? Use binary probes. probe LogicWorks has gates with NOTs attached (small bubbles) for clearer diagrams. switches January 28, 22 Basic circuit analysis and design 5 January 28, 22 Basic circuit analysis and design 6

Example wrap-up Data representations. We used three outputs, one for each possible scenario of the numbers being greater, equal or less than each other. This is sometimes called a one out of three code. K-map advantages and limitations. Our circuits are two-level implementations, which are relatively easy to draw and follow. But, E(A,A,B,B) couldn t be simplified at all via K-maps. Can you do better using Boolean algebra? Extensibility. We used a brute-force approach, listing all possible inputs and outputs. This makes it difficult to extend our circuit to compare three-bit numbers, for instance. We ll have a better solution after we talk about computer arithmetic. Summary Functions can be represented with expressions, truth tables or circuits. These are all equivalent, and we can arbitrarily transform between them. Circuit analysis involves finding an expression or truth table from a given logic diagram. Designing a circuit requires you to first find a (simplified) Boolean expression for the function you want to compute. You can then convert the expression into a circuit. Next time we ll talk about some building blocks for making larger combinational circuits, and the role of abstraction in designing large systems. January 28, 22 Basic circuit analysis and design 7 January 28, 22 Basic circuit analysis and design 8