CARLETON UNIVERSITY. Deparment of Electronics ELEC 2607 Switching Circuits January 19, Overview;

Similar documents
CARLETON UNIVERSITY. X = Y 0 0 X > Y 1 0 X < Y 0 1 never 1 1 happens. Examples

Overview. Multiplexor. cs281: Introduction to Computer Systems Lab02 Basic Combinational Circuits: The Mux and the Adder

1 Boolean Algebra Simplification

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

Experiment 7: Magnitude comparators

Combinational logic systems

Chapter 1: Logic systems

Foundations of Computation

Latches. October 13, 2003 Latches 1

DESIGN AND IMPLEMENTATION OF ENCODERS AND DECODERS. To design and implement encoders and decoders using logic gates.

Synchronous Sequential Circuit

Lecture 14 Finite state machines

Digital Circuit Engineering

Digital Circuit Engineering

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

The Design Procedure. Output Equation Determination - Derive output equations from the state table

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Learning Objectives:

ELCT201: DIGITAL LOGIC DESIGN

Philadelphia University Student Name: Student Number:

CSCI 2150 Intro to State Machines

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

Combinational Logic Design Combinational Functions and Circuits

Mealy & Moore Machines

Philadelphia University Student Name: Student Number:

Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

Implementation of Boolean Logic by Digital Circuits

Boolean Algebra & Digital Logic

Different encodings generate different circuits

CHAPTER1: Digital Logic Circuits Combination Circuits

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

6 Simplification of. Boolean Functions

CPE100: Digital Logic Design I

Simplifying Logic Circuits with Karnaugh Maps

Synchronous Sequential Circuit Design. Digital Computer Design

Analysis of Clocked Sequential Circuits

15.1 Elimination of Redundant States

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

University of Florida EEL 3701 Summer 2015 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Tuesday, 30 June 2015

Boolean Logic Prof. James L. Frankel Harvard University. Version of 3:20 PM 29-Aug-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved.

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

Sequential Circuit Analysis

Q: Examine the relationship between X and the Next state. How would you describe this circuit? A: An inverter which is synched with a clock signal.

Physics 2020 Laboratory Manual

Boolean Algebra and Digital Logic

Introduction to Karnaugh Maps

CSE 20 DISCRETE MATH. Fall

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Chapter 5 Synchronous Sequential Logic

University of Minnesota Department of Electrical and Computer Engineering

Written reexam with solutions for IE1204/5 Digital Design Monday 14/

Digital Circuits and Systems

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

Building a Computer Adder

CSC258: Computer Organization. Digital Logic: Transistors and Gates

University of Technology

Synchronous Sequential Logic

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

Boolean Logic Continued Prof. James L. Frankel Harvard University

Week-I. Combinational Logic & Circuits

Digital Logic (2) Boolean Algebra

Chapter 9 Asynchronous Sequential Logic

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

UNIVERSITY OF WISCONSIN MADISON

Binary addition example worked out

Review: Additional Boolean operations

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

DE58/DC58 LOGIC DESIGN DEC 2014

MA 3260 Lecture 10 - Boolean Algebras (cont.) Friday, October 19, 2018.

ECE 2300 Digital Logic & Computer Organization

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

ELCT201: DIGITAL LOGIC DESIGN

Combinational Logic Trainer Lab Manual

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

EXPERIMENT #4: SIMPLIFICATION OF BOOLEAN FUNCTIONS

Simplify the following Boolean expressions and minimize the number of literals:

Lecture (08) Synchronous Sequential Logic

Logic Design. Chapter 2: Introduction to Logic Circuits

The course web site s notes entitled Switches, Gates and Circuits which can be found at will be useful to you throughout the lab.

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Exam for Physics 4051, October 31, 2008

Combinational Logic. By : Ali Mustafa

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

Chapter 3 Combinational Logic Design

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Synchronous Sequential Circuit Design

Written exam with solutions IE1204/5 Digital Design Friday 13/

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Chapter 2 Combinational Logic Circuits

Digital electronic systems are designed to process voltage signals which change quickly between two levels. Low time.

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

Time Allowed 3:00 hrs. April, pages

Transcription:

CARLETON UNIVERSITY Deparment of Electronics ELEC 267 Switching Circuits January 9, 24 Laboratory. Overview; A 4-Bit Binary Comparator Take a 4-bit binary number X, for example. This number is made of bits which we will call X 3 X 2 X X. Thus X 3 =, X 2 =, X =, X =. The full number is written in boldface, the individual bits are written with a subscript. A binary comparator compares two binary numbers nd Y. It can tell if X is larger, smaller, or equal to Y. The comparator in this lab will compare two 4-bit nonnegative binary numbers, and displays the result on two lights called Lx and Ly.. FIGURE : A block diagram of the circuit, showing the meanings of Lx and Ly, and some example comparisions X 3 X 2 X X COMPARAT Y 2 Y Y 4 DATA BITS LEAST SIGNIFC BIT LEAST SIGNIFC BIT Lx Ly Lx Ly X = Y X > Y X < Y never happens Examples X Y X 3 X 2 X X Y 2 Y Y Lx Ly This comparator is designed by breaking the circuit into subcircuits or blocks. Each block does a small part of the job. They can be made identical, which will save design work. Each subcircuit will compare two 2- bit numbers, say and Y a. The outputs will be two -bit numbers a and a.. FIGURE 2: Subcircuit or block Y a X 3 X 2 X X Y 2 Y Y COMP ba a a b Y ab = Y a > Y a < Y a Unused Output COMP 32 X 32 2 COMP 32 Lx Ly COMP X Y X 32 2 Complete block diagram to compare two 4-bit numbers. All three blocks can be made identical. However it turns out that COMP 32 can be made simpler than the other two. J.Knight, January 9, 4 SWITCHING CIRCUITS Lab -

J.Knight, January 9, 4 SWITCHING CIRCUITS Lab-2 These outputs have been carefully chosen so that the outputs of two comparators like COMP 32 and COMP, shown below, can be themselves compared with an identical subcircuit COMP 32. The output of this third block will be the desired output to lights Lx and Ly FIGURE 3: Examples:. X 3 = X 2 = = Y 2 = X = X = Y = Y = X 3 = X 2 = = Y 2 = X = X = Y = Y = COMP 32 X 32 = 2 = COMP X = Y = COMP 32 X 32 = 2 = COMP X = Y = COMP 32 X 32 = 2 = Lx Ly COMP 32 X 32 = 2 = Lx Ly Prelab This must be prepared prior to the scheduled lab session. It will be checked near the start of the lab. The prelab is the basis for the design part of the lab report. However it usually need considerable cleaning up and editing for the final report.. Complete the comparison algorithm, written like a computer program, for the generic subcircuit for the iterative comparator. Generic means for arbitrary inputs like and Y a rather than for specific inputs like X 2 X and Y 2 Y Y a Algorithm for one block of the comparator circuit. Inputs:, Y a, Outputs: a, a If ( > Y a ) Then a =; a ----- If - - - - - - - COMP ba a a.2 Complete the truth table, Fig. 4 (p. 3), for the generic comparator subcircuit, relating the inputs to the outputs. The inputs in the figure are in binary order. You may want to arrange them so the terms with no outputs are at the bottom., as shown in Fig. 5 (p. 3) Lab -2 SWITCHING CIRCUITS J.Knight, January 9, 24

FIGURE 4: Incomplete the truth table for the generic comparator subcircuit. COMP ba a a Ya b Y ab = Y a > Y a < Y a Unused Output inputs outputs Y a a a Boolean function to get a output for this particular line of inputs a a Comparison as 2-bit binary numbers. = Y a Y a < Y a Y a < Y a Y a < Y a Y a > Y a = Y a Y a < Y a Y a < Y a - - - - - - - - - - - - - - - - - - - - - -.3 Find the logical equations relating,, Y a to a, a. To do this note for the partial table that a = for:,,, Y a =,,, or,,, or,,, or,,, or,,,... If,,, Y a =,,, then Y a = = If,,, Y a =,,, then Y a = = If,,, Y a =,,, then Y a = = If,,, Y a =,,, then Y a = = If,,, Y a =,,, then Y a = = With Boolean ( ) and (+) : a = Y a + Y a + Y a + Y a + Y a... () Complete the logic equation for the full truth table..4 Simplify the logic equation to reduce its size. For example,in partial expression (),the 2nd, 3rd, 4th and 5rd terms have two common variables, and. Considering only those four terms gives - Y a + Y a + Y a + Y a. = Y a + Y a + Y a + Y a = ( Y a + Y a + Y a + Y a ) = ( (Y a + Y a ) + (Y a + Y a )) (2) = you do the rest FIGURE 5: Rearrangement of part of Fig. 4 so the a = terms are all at the top and handy. inputs outputs Y a a a - Expression to generate a Y a Y a Y a Y a Y a Y a All other inputs J.Knight,January 9, 4 SWITCHING CIRCUITS Lab -3

J.Knight, January 9, 4 SWITCHING CIRCUITS Lab-4 Since X+X=X, one can reuse terms that were included in the previous reduction. Note the st and 3rd terms have two common letters. We need to include the st term in the final expression. The 3rd term can be reused - Y a + Y a = Y a ( + ) (3) FIGURE 6: = you do the rest Simplify the complete equations for a and a. a and a can be reduced to 6 letters each. Y a.5 From the equations one can draw a schematic diagram using, and INVERT gates. Fig. 6 shows the schematic for expression (2) ed with (3). Draw a schematic of a circuit to implement the complete equations for a and a. using, and INVERT gates..6 When drawing a theoretical circuit for a logic equation, one typically uses and gates. In practice, N and N gates are much easier to build. Thus real logic gets built with NS and Ns. On the Tektron logic board, used in the lab, the available gates are mostly Ns and Ns. The board contains only four 2-input s and four 2-input s. These are barely enough s and s for one comparator block. However you can easily implement your circuits using N gates, and perhaps N gates as described below. Use the diagram for the Tektron Logic Lab to complete the list of the number of gates of each type. Expression (2) ed with (3). This is only part of the circuit. for a. One way of implementing the complete circuit for a. It allows using a dual 2-input - gate. 2-input 3-input 2-input 2-input X 4 avaliable 3 avaliable 4 avaliable 4 avaliable 4 avaliable dual 2-input -N.7 There is a very important theorem, called DeMorgan s theorem ( Fig. 7) that will soon be done in the lectures. It proves that an N gate is equivalent to an gate with both its inputs inverted. The top of the following figure shows the two equivalent forms for N and for N. The lower part of Fig. 7 shows how to implement circuits made of operations followed by, using only N gates. Fig. 8 shows some more ways of using Ns and Ns instead of s and s....8 Revise the circuit for the generic comparator subcircuit using only gates which are plentiful in the Tektron Logic Lab. The same circuit is used for both of the COMP 32 and COMP blocks in Fig. 2. Be sure there are enough gates of the right types to build two subcircuits. The lower COMP 32 block will turns out to be simpler because it never gets some inputs. Lab -4 SWITCHING CIRCUITS J.Knight, January 9, 24

FIGURE 7: A B N C A B N C D E N F D E N F A B = C = A + B D + E = F = D E By using DeMorgan on the N gate symbol, one gets another equally valid symbol.- Both the with a negated output and the with negated inputs are equally valid symbols for a N gate. Ns with 3 or more inputs convert to an with 3 or more inverted inputs. In the same way, the N gate has two equally valid forms. X W U V Z = X W + U V X W U V N N N Z = X W + U V X W U V N N N Z = X W + U V Placing inverting circles back-to-back makes it possible to add negating circles to the outputs of the s, and the inputs of the, without changing the circuit function. This changes all three gates to N gates. FIGURE 8: Conversion of Fig. 6b to more common gates using DeMorgan s theorem. N N N N.9 Consider the lower block COMP 32. From the table in part X 3 X 2 X X Fig., observe that the output X 32, 2 =, never comes out Y 2 Y of block COMP 32 Thus in rows where X 32, 2 =, in the Y table for COMP 32, one can write down any output one wants; it will never happen. It turns out that the COMP 32 COMP 32 COMP circuit is smaller if these outputs are made 2,X 32 =,. X 32 X Y We call such outputs (for inputs that never happen) don t 32 Y care outputs. We could have made these outputs, or if we had wanted to, but making them gives a smaller circuit. COMP 32 X 32 2 The truth table of part Fig. 4 has been partially redone in Fig. 9 to apply to COMP 32 under the conditions that X 32, 2 =, and/or X, Y =, never happens. Thus the corresponding outputs have been made,. J.Knight,January 9, 4 SWITCHING CIRCUITS Lab -5

J.Knight, January 9, 4 SWITCHING CIRCUITS Lab-6 FIGURE 9:. Part of the truth table for COMP 32 with don t care outputs made,. X 32 X 2 Y X 32 2 Comparison as Y a a a 2-bit binary. = Y a Y a < Y a Y a < Y a Y a < Y a Y a > Y a make these outputs, Never happens =Y a Y a < Y a - - - - - a a make these outputs, Never happens =Y a - - - - - - - - - -. Minimize the logic equation for COMP 32 so X 32 uses an, two s, and some inverters. 2 uses the same. Write the equations.. Draw a circuit for COMP 32 using s s and inverters..2 Redraw the circuit using only gates available on the logic trainer, which were not previously used..3 The complete circuit you are about to build is likely larger than anything you have wired before. It is essential to plan it systematically. We strongly suggest the following Take the schematic diagrams of the generic subcircuit using the gates available on the logic trainer. Make sure it is uncrowded and neat without scratched out lines, or bubbles, s changed to s by scratching over the top, ditto marks, etc. Write the equation for the subcircuit underneath it. Use a separate sheet of paper from the wiring diagrams described next. Take the diagram of the Tektron logic lab. Select the gates you will use for each subcircuit. Draw a balloon around the gates in each block or, as done on the right, each half-block. Fill in the detailed wiring within the subcircuit. Use textual names to show the input and output signals entering or leaving your balloon, rather than the wires. If you show too many long wires your drawing will be so cluttered it will become useless. However the short wires inside the balloons are best drawn as lines. Y a Y a X 3 X 3 X 2 a = + Y a ( + ) COMP 32(X) X 32 a COMP ba (Y) a X 3 Y ab COMP 32(Y) Try using different colors. X 2 balloon Y 2 X 3 Lab -6 SWITCHING CIRCUITS J.Knight, January 9, 24

.4 The bottom block COMP 32 is simpler. Again be sure you have a good clear schematic using the available gates. Then add the wiring to the Tektron layout sheet. END OF PRELAB Constructing Your Circuit. The typical student is psychologically unprepared for the fact that they could make a wiring mistake. They tend to wire the complete circuit and then test it. We suggest you build and test the circuit in parts. Debugging five gates is far easier than debugging twenty. 2.5 Choose four switches for the X input and four for the Y input. Choose lights for X 32 = L x and 2 = L y, the final output. Choose two other pairs of lights to display X 32-2, and X -Y.. 2.6 Before wiring, make sure the wires you use look clean on the ends. Also push each lead firmly into the hole. Grip the lead by the metal tip and give it a very slight ( degree) twist after inserting 2.7 Construct COMP : Wire the subcircuit. Wire X and Y to the switches. Wire X and Y to the switches. Wire X and Y their two lights. Test the subcircuit COMP. SWITCH OUTPUTS LAMP INPUTS X 32 2 X Y 2 3 4 5 6 7 8 X3 X2 X X Y3 Y2 Y Y Lx Ly 9 Y X X X COMP X Y X Y 3 7 Y X 4 X 8 Y 9 2.8 Construct COMP 32 in the same way. Test it too! 2.9 Construct COMP 32. Do not be in a hurry to connect it to the other blocks. First: Wire X 32 and 2 to two spare switches such as such as 8 and 9, to aid debugging. There are no more spare switches, but you can temporarily wire X and Y to the push buttons. J.Knight,January 9, 4 SWITCHING CIRCUITS Lab -7

J.Knight, January 9, 4 SWITCHING CIRCUITS Lab-8 Wire outputs X 32 and 2 to the L x and L y lights respectively. You can now test the subcircuit COMP 32. Remember the don t care inputs should give output PULSE OUTPUTS temporary connections 2.2 Remove the temporary connections and wire the complete comparator as it should be. 2.2 Debugging: Sometimes the plastic connection boards are loose in the connector in wooden frame. Push the heel of your hand on the plastic on the side of the board and push them in. If you are really having trouble it may be useful to use two trainers. Place them side by side and connect the GROUND pins by a lead. This will give you some extra debugging lights, and some less cluttered space. Check out and Clean Up 2 3 X 32 X X 32 COMP 32 Y 2 2 Lx Ly When your circuit works, demonstrate it to the teaching assistant. After demonstrating clean up your board, sort the leads, and put them back in their box. We have a contract with Lord Voldemont to deal with students who do not clean up. 9 Lab -8 SWITCHING CIRCUITS J.Knight, January 9, 24

Partial Layout of The Tektron Logic Lab. You should not need the JK flip-flops and RS latches which were omitted. PULSE OUTPUTS 2 3 CONSTANT OUTPUTS TEKTRON COMPUTER LOGIC LAB SWITCH OUTPUTS LAMP INPUTS 2 3 4 5 6 7 8 9 J.Knight, January 9, 4 Lab -9 DIGITAL ELECTRONICS

Partial Layout of The Tektron Logic Lab. You should not need the JK flip-flops and RS latches which were omitted. PULSE OUTPUTS 2 3 CONSTANT OUTPUTS TEKTRON COMPUTER LOGIC LAB SWITCH OUTPUTS LAMP INPUTS 2 3 4 5 6 7 8 9 J.Knight, January 9, 4 Lab - DIGITAL ELECTRONICS