Digital Design IE1204/5

Similar documents
Words Symbols Diagram. abcde. a + b + c + d + e

OUTLINE SYSTEM-ON-CHIP DESIGN. GETTING STARTED WITH VHDL August 31, 2015 GAJSKI S Y-CHART (1983) TOP-DOWN DESIGN (1)

CS 316: Gates and Logic

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Chapter. Contents: A Constructing decimal numbers

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May Time: 14:00 16:00

Ratio and Proportion

Lec 2: Gates and Logic

Learning Outcomes. Computer Systems - Architecture Lecture 4 - Boolean Logic. What is Logic? Boolean Logic 10/28/2010

1. Definition, Basic concepts, Types 2. Addition and Subtraction of Matrices 3. Scalar Multiplication 4. Assignment and answer key 5.

Homework 3 Solutions

Quick Guide to Lisp Implementation

SE3BB4: Software Design III Concurrent System Design. Sample Solutions to Assignment 1

Printer Disk. Modem. Computer. Mouse. Tape. Display. I/O Devices. Keyboard

SECTION 7-2 Law of Cosines

Angles 2.1. Exercise Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example

Practice Test 2. a. 12 kn b. 17 kn c. 13 kn d. 5.0 kn e. 49 kn

Module 5. Three-phase AC Circuits. Version 2 EE IIT, Kharagpur

1 Fractions from an advanced point of view

The remaining two sides of the right triangle are called the legs of the right triangle.

Operations with Polynomials

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

End of term: TEST A. Year 4. Name Class Date. Complete the missing numbers in the sequences below.

c b N/m 2 (0.120 m m 3 ), = J. W total = W a b + W b c 2.00

EQUATIONS OF LINES AND PLANES

1 GSW IPv4 Addressing

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

Student Access to Virtual Desktops from personally owned Windows computers

Or more simply put, when adding or subtracting quantities, their uncertainties add.

How To Organize A Meeting On Gotomeeting

Active Directory Service

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Binary Representation of Numbers Autar Kaw

Data Security 1. 1 What is the function of the Jump instruction? 2 What are the main parts of the virus code? 3 What is the last act of the virus?

Lesson 2.1 Inductive Reasoning

Algebra Review. How well do you remember your algebra?

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Regular Sets and Expressions

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

McAfee Network Security Platform

MATH PLACEMENT REVIEW GUIDE

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

Maximum area of polygon

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

KEY SKILLS INFORMATION TECHNOLOGY Level 3. Question Paper. 29 January 9 February 2001

2 DIODE CLIPPING and CLAMPING CIRCUITS

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Reasoning to Solve Equations and Inequalities

European Convention on Products Liability in regard to Personal Injury and Death

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

LISTENING COMPREHENSION

Enterprise Digital Signage Create a New Sign

VMware Horizon FLEX Administration Guide

Arc-Consistency for Non-Binary Dynamic CSPs

Section 5-4 Trigonometric Functions

SPECIAL PRODUCTS AND FACTORIZATION

MA Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

Experiment 6: Friction

SOLVING EQUATIONS BY FACTORING

Vectors Recap of vectors

Radial blowers with AC motor

Lectures 8 and 9 1 Rectangular waveguides

5.6 POSITIVE INTEGRAL EXPONENTS

Density Curve. Continuous Distributions. Continuous Distribution. Density Curve. Meaning of Area Under Curve. Meaning of Area Under Curve

VMware Horizon FLEX Administration Guide

Calculating Principal Strains using a Rectangular Strain Gage Rosette

Lecture 3 Gaussian Probability Distribution

Unit 6: Exponents and Radicals

- DAY 1 - Website Design and Project Planning

Chapter. Fractions. Contents: A Representing fractions

50 MATHCOUNTS LECTURES (10) RATIOS, RATES, AND PROPORTIONS

The Cat in the Hat. by Dr. Seuss. A a. B b. A a. Rich Vocabulary. Learning Ab Rhyming

Start Here. Quick Setup Guide. the machine and check the components. NOTE Not all models are available in all countries.

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Vectors Summary. Projection vector AC = ( Shortest distance from B to line A C D [OR = where m1. and m

MATH 150 HOMEWORK 4 SOLUTIONS

Fundamentals of Cellular Networks

One Minute To Learn Programming: Finite Automata

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

GENERAL OPERATING PRINCIPLES

Architecture and Data Flows Reference Guide

Start Here. Quick Setup Guide. the machine and check the components DCP-9020CDW

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

0.1 Basic Set Theory and Interval Notation

6.2 Volumes of Revolution: The Disk Method

9 CONTINUOUS DISTRIBUTIONS

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

How To Balance Power In A Distribution System

Review. Scan Conversion. Rasterizing Polygons. Rasterizing Polygons. Triangularization. Convex Shapes. Utah School of Computing Spring 2013

INSTALLATION, OPERATION & MAINTENANCE

Graphs on Logarithmic and Semilogarithmic Paper

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

Transcription:

Digitl Design IE4/5 Eerises Compiled y Willim Sndqvist willim@kth.se ICT/ES Eletroni Systems

Numer systems nd odes. Enter the orresponding inry numers for the following deiml numers se. 9 7 d 53. Convert the following inry numer to deiml...3 Convert the following inry numers se to the orresponding otl numers se8 nd hedeiml numers se6. d e..4 Convert the following hedeiml numers se6 to the orresponding otl numers se8. 94D 6 9E.7A 6.5 Convert the otl se8 numer 455 8 to the orresponding hedeiml numer se6..6 Write the hedeiml se6 numer BAC 6 in deiml form se..7 Wht hrterizes Gry odes, nd how n they e onstruted?.8 Write the following signed numers with two's omplement nottion, 6, 5, 4, 3,,,. -3-38 d -64.9 Write the following signed numers with one's omplement nottion, 6, 5, 4, 3,,,. -3-38 d - Digitl rithmeti. Add y hnd the following pir of inry numers... d... Add or sutrt ddition with the orresponding negtive numers the following pir of numers. The numers shll e represented s inry 4-it numers Nile in two's omplement form. 4 7 8 d -3 5.3 Multiply y hnd following pirs of unsigned inry numers... d...4 Divide y hnd following pirs of unsigned inry numers.. / / 3

.5 IEEE-754 stndrd for storge of 3-it flot. Assume tht 3-it flot is stored in register: 4C8 6 Wht rel deiml numer is this?.6 Floting point formt's priniples eomes more trnsprent if one of pedgogil resons "sles down" to 4- it register size Nile. However, 4-it formt would e prtilly unusle. 3 Assume the following four it floting point formt: [ 3 ]. The sign is epressed with the it 3, the mntiss is represented y one it, nd the eponent hs two its epressed s eess -. Count up the numer tht n e represented with full preision. Mrk them on the numer line. How ig is the lrgest quntiztion error? Cn the numer e represented? If not, suggest hnge in the formt so tht n e represented..7 To emine the ddition nd multiplition of floting point, we ssume now for pedgogil resons 6 it formt. This is still to few its to e prtilly usle. [ ] 5 4 3. 5 43 Whih of the following numers n e represented in this formt?,5,85 -,375 4,5 7.5 Add the numers 5 4 3 nd. Wht is needed to void loss of preision? Multiply the previous numers with eh other. 4

Sets nd Cues Venn-digrm representtion Constnt Constnt Vrile Vrile 3. y y y Prove the distriutive lw with the help of Venn digrm. y z y z 3. Prove De Morgn's lw using the Venn digrm. y y 3.3 Drw Venn digrm for three vriles nd mrk where the truth tle ll mintermer re pled. Minimize the funtion using the Venn digrm. f Cue representtion 3.4 Represent the following funtion of three vriles s 3-dimensionl ue with Gry-oded orners. f,, m,,3, 4,6 Use the ue to simplify the funtion. 5

Boolen lger nd gtes Boolen lger 4. Use the lws of Boolen lger to simplify the following logi epressions: f d d f f d f e f f f g f d d h f i f 4. Prove lgerilly tht the following reltions re vlid. 3 3 3 3 3 3 d 3 3 3 4.3 Simplify the following three epressions s muh s possile. y z y y y y y 4.4 Simplify the following epression s fr s possile. 6

Gtes 4.5 Speify the output / for the following si types of gtes when the inputs re s given in the figure. Speify the input / for the following si types of gtes when the output signls re s given in the figure. & & 4.6 Simpify f, whih re relized y the gte iruit, s muh s possile, nd speify the funtion nme. 4.7 Drw timing digrm of signls A, B, C, D, f. The inputs,, nd hs the frequeny rtio 4: : to "sweep" through the truth tle omintions in the "right" order. Write the truth tle for the funtion f. 7

4.8 Speify the logil epressions for A, B, C nd D. 4.9 Simplify the omple epressions elow s muh s possile. 4. Show tht 4. The figure shows the interntionl stndrd gte symols. Ameri's dominne in the semiondutor re implies tht one must lso e fmilir with the Amerinn symols. Nme the gtes nd drw the orresponding Amerin gte symols. 4. A omintoril network with si inputs 5, 4, 3,,, nd three outputs u, u, u, is desried with tet s follows: u if nd only if either oth nd is or 4 nd 5 re different u if nd only if nd re the sme nd 5 re the inverse of u if nd only if is nd some of... 5 is Desrie the network with Boolen lger nd opertions AND OR NOT XOR insted. 8

Truth tle, SoP nd PoS -form, Complete logi 5. The figure shows simple "ode lok" with hnge-over ontts. The lmp will light for ertin omintion of simultneously pressed ontts,. Whih omintion? Speify the logil funtion for light up the lmp. Vriles nmes stnds in the figure k. f 5. A logi funtion hs the following Stte Tle: f Speify the funtion of PoS-norml form produt of sums: f,, Speify the funtion of SoP-norml form sum of produts: f,, 5.3 A miniml funtion is speified on the SoP form sum of produts. Type the sme funtion s SoP norml form, nd s PoS norml form. f, y, z y yz z 5.4 A funtion is denoted s miture of produts nd sums. Type the sme funtion s SoP norml, nd s PoS norml. yz y z yz f, y, z y y 9

Equivlene AND-OR / NAND-NAND nd OR-AND / NOR-NOR 5.5 Drw this AND/OR network s NAND/NAND network. 5.6 Drw this OR /AND networks s NOR/NOR network. 5.7 Write the truth tle for iruit with four inputs tht define the even prity; ie iruit output is "" when n even numer of inputs re simultneously "". Implement this funtion with s few NOR gtes s possile.

The Krnugh mp 6. Mke the est possile groups in the Krnugh mp. Enter the minimized funtion t the SoP form. f d 6. Mke the est possile groups in the Krnugh mp. Enter the minimized funtion t the SoP form. f d 6.3 Ple this funtion in the Krnugh mp. f d Try to find etter groups. Enter the minimized funtion t the SoP form. f 6.4 The top of the figure to the right is NOR-NOR network. Anlyse this network nd insert the truth tle in the Krnugh mp. Mke groups in yhe Krnugh mp nd relize the funtion with NAND gtes t the ottom of the figure. Vriles nd re ville in oth norml nd inverted form.

PLD iruits often hve n XOR gte t the output so tht one is to e le to invert the funtion. One n then hoose to group together s or s fter wht is the most dvntgeous. 6.5 A funtion with four vriles re defined with minterms in the SoP form. Use Krnugh mp to minimize the funtion. Also minimize the funtion s inverse. f 3,,, m,, 4, 8,, f? f? 6.6 A funtion with four vriles re defined with minterms in the PoS form. Use Krnugh mp to minimize the funtion. Also minimize the funtion s inverse. f 3,,, M,, 4, 5,,, 4, 5 f? f? 6.7 A funtion with four vriles re defined with mintermer the SoP form. Use Krnugh mp to minimize the funtion. Also minimize the funtion inverse. f 3,,, m,, 3, 4, 6, 7, 8, 9,,, 3, 4 f? f? 6.8 Sometimes the prolem is suh tht ertin input omintions re "impossile" nd therefore n not our. Suh minterms or mterms re denotet with d "do not re" nd ould e used s ones or zeros depending on wht works est to get s ig s possile groups. f 3,,, m3, 5, 7, d6, 5 f? f? 6.9 f 3,,, m, 4, 5 d, 3, 6, 7,8,9,,3 f? f?

6. A funtion with five vriles is defined s f 4, 3,,, m9,,, 3, 4, 5, 6, 8, 4, 5, 6, 7 see the ompleted truth tle. Use Krnugh mp method for minimizing the funtion. Also minimize the funtion s inverse. f 4, 3,,, f? f? 4 3 f 3 4 5 6 7 8 9 3 4 5 4 3 f 6 7 8 9 3 4 5 6 7 8 9 3 3 3

MOS-trnsistors nd digitl iruits 7. Identify trnsistors ehvior, nd write the truth tle for YA. Whih logi funtion is it? 7. Identify trnsistors ehvior, nd write the truth tle for YA,B. Whih logi funtion is it? 4

7.3 Identify trnsistors ehvior, nd write the truth tle for YA,B. Whih logi funtion is it? 7.4 Study the iruit nd desrie the funtion. Wht role does the signl EN hve? Wht reltionship holds etween Y nd A? YA. How mny "sttes" n the output hve? 7.5 The figure shows one hlf of CMOS iruit. Drw the other hlf, whih ontins the PMOS trnsistors. Enter the logil funtion YA,B,C. 5

Comintionl iruits 8.. Derive the Boolen epressions to minimized SoP form of omintoril network tht onverts three-it inry oded numer X,, to inry oded si it numer U u 5, u 4, u 3, u, u, u whih is equl to the squre of the input U X. Use Krnugh mps. 8. A monitoring system for wter tnk onsists of four level sensors 3,,,. The signls from these forms inry four-it numer X. A logi iruit Tnk Level Logi trnsodes X to three it numer U u, u, u whih presents the level s inry numer etween nd 4. Construt the logi network. Derive the Boolen epressions on minimized the SoP form. Tke dvntge tht mny of input signl omintions n never our! The input vriles re ville in oth inverted nd not inverted form from the level sensors. Use AND_OR to NAND_NAND equivlene to produe logi network using only NAND gtes. 8.3 A pier t n irport hs five onneting Gtes rmp. The Gtes re numered...5. At eh Gte there re sensor with the output signl r i if n irrft is onneted to the Gte, otherwise. A omintoril iruit, P, helps ir trffi ontroller to diret rriving irrft to ville Gtes. The iruit P hs input signls r, r, r 3, r 4, r 5 nd output signls y 4, y, y. The omintion of the oututs y 4, y, y should in inry give the numer of the Gte with the mimum sequene numer tht is vnt. If no Gte is free the numer y 4, y, y,, is used. Minimize eh output seprtely. 6

8.4 The deiml digits to 9 n e enoded in the so-lled 74 ode. It is lned inry position ode with weights 7, 4,, nd, where two omintions of weighted its n provide the sme vlue, the ode word with the minimum numer of ones is seleted. 74-ode hs the property tht it enodes the digits to 9 with miniml numer of ones, totl of 4 st. Design iruit tht trnsltes from the 74 Code to the more onventionl BCD ode ode 84. Use PLD iruit of the AND-OR type. Both the AND plne nd the OR plne n e progrmmed individully. Drw ross in the figure elow to show the progrmmed onnetions to e mde. The Gtes inputs re drwn in "simplified" wy. 8.5 A 7-segment enoder deodes inry 4-it numer to the orresponding segment imge for the numers... 9 or hedeiml... F. Set up the truth tle, nd enter minimized logil iruit for one of the segments for emple segment "G". 8.6 Show how 4- multipleer n e used s funtion genertor nd s suh generte the OR funtion. 7

8.7 A mjority gte dopt t output the sme vlue s the mjority of the inputs. The gte n for emple e used in fult-tolernt logi, or for imge proessing iruits. Derive the gte's truth tle nd minimize the funtion with Krnugh mps. Relize the funtion with AND-OR gtes. Relize the mjority gte with 8: MUX. Use Shnnon deomposition nd relize the mjority gte with : MUX nd gtes. d Relize the mjority gte with only : MUXes. 8.8 Derive the Full Adder truth tle. Show how full dder is implemented in n FPGA hip. Logi elements in FPGA is le to sde C OUT nd C IN etween stges. Show the ontents of the SRAM ells the LUT, Lookup Tle. 8

8.9 Show how one four-input XOR gte XOR re relized in FPGA iruit. Show the ontents of the SRAM ells the LUT, Lookup Tle. 9

8. The Boolen funtion Y of four vriles 3 is defined y it s truth tle. Use the Krnugh mp to onstrut miniml iruit for the funtion use s don t re. Choose ny gtes.. Relize the funtion Y with 4: multipleer nd ny gtes. Use nd s the multipleer selet 3 signls. Y Y 3 3 8 9 3 4 5 3 6 4 7 5

Sequentil iruits, lthes nd loked flip-flops 9. Complete the timing digrm for the output signls Q nd Q. The distne etween the pulses is muh longer thn the gte dely. Wht is loking input signl for the NOR gtes 9. You proly know the lth to the right. The usul nmes re repled with d. Fill in the hrteristi tle. & & d d 9.3 Drw in the timing digrm the output Q, for the D-flip-flop. D CP D C Q Q D CP Q 9.4 Drw Q in this timing digrm. 9.5 JK flip-flop ws n older type of "universl flip-flop". Show how it n e used s T flip-flop nd D flip-flop.

Flip-Flop Timing Prmeters. The fip-flop is loded with dt t the positive edge of the lokpulse, ut dt must e stle t s efore the lok edge nd even the time t h fter. The dt n e found t output fter the time t pd. t pd n e different for respetive trnsitions. If these times re not respeted the flip-flop funtioning eomes unertin. 9.6 Wht is the mimum lok frequeny tht n e used to the iruit in the figure without risking mlfuntion? Suppose t s ns t h 5 ns t pd 3 ns 9.7 The figure shows three different stte mhines. Speify the stte mhine A, B or C tht n operte t the highest lok speed. Highlight the ritil pth the pth tht limits lok frequeny in this figure nd lulte the period time for the lok signl Clk

Sequentil iruits. Determine the stte digrm nd stte tle for the sequene iruit. Whih of the models Mely or Moore fits the iruit?. Determine the stte digrm nd stte tle for the sequene iruit. Whih of the models Mely or Moore fits the iruit?.3 Determine the stte digrm nd stte tle for the sequene iruit. Whih of the models Mely or Moore fits the iruit? 3

.4 Is there ny stopping ondition, loss ondition or isolted sttes in the stte digrm? Stopping ondition: Loss ondition: Isolted sttes:.5 To the right is stte digrm for Moore mhine. it will detet doule tp. A monkey identlly get hold of the push-utton input signl, nd then presses ording to the timing digrm elow. The Moore-mhine hs flip-flops tht re triggered y the positive edge of the lok. Suppose tht the initil stte is Z. Fill in the sttes the mhine enters.. Z: CP i Z Z Z Z Z Z Z Z Z Z.6 Construt Moore mhine whih requires tht the input signl is equl to one i during three suessive lok pulse intervl, for the output to e one u. As soon s the input signl eomes zero i during lok pulse intervl, the iruit output should return to zero u. See the stte digrm. Choose Gry ode for stte enoding. Z, Z, Z, Z3. Use D-flip-flops nd AND-OR gtes. This is sfety iruit to prevent "flse lrms 4

.7 Construt sequentil iruit tht detets when the input signl hs trnsition nd then hs the output u in the following lok-pulse intervl, nd then eing for the rest of the sequene. The iruit should e le to "reset" with n synhronous reset pulse NR tive low, so tht it monitors the input signl gin. Drw stte digrm of Moore mhine type for the sequene network. Derive the Boolen epressions for the net stte nd the output for three different stte enoding:: Binryode Gryode 3 One hot ode Show how the reset signl is onneted to NR D-flip-flops PRE nd CLR inputs..8 Design ounter tht ounts {,, 3, 4, 5, 6, }. The ounting sequene,, q q q, is to e shown with 7- segment disply, s roll of the die. Stte the epressions for the net stte. Complete the epressions with vrile EN whih will freeze the stte when EN unpressed utton. The ounter shold ount for EN pressed utton. Complete the epressions with vrile S6 whih fores the outer to stte 6 when S6 hidden utton pressed. This is the het-utton. S6 tkes preedene over EN..9 A stepper motor is digitl omponent tht is driven y pulses. Stepper motors re usully onneted to ounter ounting Gry ode. The figures ounter lso hs mode-input, m m. m m Reset fied position m m ount up w m m ount down w m m Preset nother fied position Sometimes you write oolen onditions insted of just the numers t the rrows. In the figure, oth the ondition nd numers re used. Derive the minimized epressions of the ounter net stte deoder. 5

. This stte digrm pplies to synhronous sequentil iruit. Derive stte tle. Minimize the numer of sttes. Derive the minimized stte tle Drw the minimized stte digrm.. This stte digrm pplies to synhronous sequentil iruit. Derive stte tle. Minimize the numer of sttes. Derive the minimized stte tle Drw the minimized stte digrm.. An engineering student uilds r thief lrm tht is synhronous Moore mhine. The lrm gets its "seurity" of eing seret nd unique. To strt the r you hve to mneuver the r's ontrols in the following order: Turn the ignition key ignition on Set the turn signl to the right right on 3 Turn off the ignition key ignition off 4 Set the turn signl to neutrl right off 5 Turn the ignition key ignition on If, t ny point in the list, you do the "wrong" thing you end up stuked in the n ALARM stte. If you do everything right the r strts get stuked in the IGNITION oil on stte. Sequene iruit lso hs "hidden" utton tht goes to the D-flip-flops reset, whih mens tht the lrm n e swithed ON / OFF. Drw the stte digrm for the lrm. 6

Asynhronous sequentil iruits. If the signls psses different mount of gte delys efore they re omined t the utput, then momentry unwnted devitions from the truth tle n our, so-lled "glithes". Show in Krnugh mp how to void them.. To the left in the figure, n SR lth hs two gtes with feed-k. To the right, the iruit is redrwn s omptile "Moore" mhine. There is no lok signl, nd no rel stte register. All gte delys tht re present in the network is thought pled in the symol etween Q nd Q getting similr funtion to the flipflops in synhronous sequentil iruit. Anlyze the SR-iruit in the sme wy s Moore mhine..3 Show tht there is n unstle network - n osilltor - if n odd numer of inverters re onneted in irle. Assume tht the gte dely t pd is 5 ns nd tht three gtes re onneted s in figure. Wht vlue will the osilltion frequeny get?.4 Anlyze following iruit: Drw stte digrm. Consider the iruit s n synhronous sequentil iruit whih hs the lok pulse s one of the synhronous inputs. Wht funtion does the iruit perform?.5 Construt n synhronous stte mhine tht funtions s doule edge triggered D flipflop DETFF, wih mens tht the flip-flop will hnge vlue t oth the positive nd the negtive edge of the lok. Derive the FSM. Construt the flow tle nd minimize it. Assign sttes, trnsfer to Krnugh mps nd derive the Boolen epressions. d Drw the shemti for the iruit. 7

.6 Anlyze the following iruit. Derive the Boolen epressions for the stte vriles Y nd Y. Derive the eittions tle. Whih funtion dshed re in the inner loops. Derive the flow tle, ssign symoli sttes nd drw FSM. d Identify the funtion. Whih flip-flop does this orrespond to?.7 Dt trnsfer etween different hips in eletroni equipments n e done with the so lled IC us. It onsists of two lines SDA nd SCL. The figure ove shows priniple digrm when numer of its re trnsmitted. During trnsmissom Dt D my only e hnged when SCL. Positive nd negtive SDA-edge when SCL re used s unique strt nd stop signls for dt trnsmission. During trnsmission no suh edges n our. Before the stop pulse, the reeiver n "knowledge" the reeption - in the figure we disregrds this. In order to study the IC dt trnsfer wnts to onstrut Moore-equivlent synhronous sequentil iruits whih provide output usy during the time from the strt signl until the stop signl. When no dt ommunition ours is usy. Derive primitive flowtle Minimize the flowtele Choose ode for stte signment derive the eittion tle motivte tht the design is free of ritil re Derive the minimized Boolen epressions motivte freedom of hzrd 8

Address deoding of memories nd I/O iruits. A dynmi RAM-memory onsists of numer of 56Mit memory hips orgnised s 3 M 8. How mny hips re needed for 56M 64? How mny hips re needed for 5M 7? Wht n e the reson for the "strnge" it width "7"?. 3:8-deoder ROM 5k 8 SRAM 5k 8 A ertin 6 it proessor n ddress 4 its. Memory Spe is divided etween ROM, SRAM nd IO iruits. Address deoding is done using 3:8-deoder. How lrge is the RAM in the figure? Wht is the ddress rnge epressed in hedeiml numers? How do you hnge the ddress rnge to 98 AFFFFF? How do you hnge the ddress rnge to 48 5FFFFF? 9

d Typilly proessor reds its first instrution from ddress then there must e red t tht ddress. Assume tht the ROM is M 6 itr nd tht the ddress rnge is... nd eyond. ROM Chip is 5k 8. How mny hips re needed? How should the deoder e onneted? How shll the memoryhips e onneted? Speify ddress spe of deoder outputs in hedeiml. numers. e Whih ddress spe eomes ville for SRAM nd IO iruits?.3 Peripherls, I/O, re often onneted to CPU s if they were memory hips though with only few "memory ells". Eg. rel time lok hip - keeps trk of the time nd dte. It is ontrolled/red from the 8 uilt-in 8-it registers. Connet one eight registers memory-mpped peripherl devie I/O to CPU. The CPU hs 6-it dt us we only use 8 its, nd 4 it ddress us. Use 3:8-deoder nd if needed gtes. The peripherl devie must e onneted so tht the ddresses re 7. Compre with the previous tsk. Wht is inomplete deoding? 3

Solutions Numer systems nd odes. Enter the orresponding inry numer se to the following deiml numers se. 9 3 8 84 7 647 644 d 53 5 9 5 8 -. Convert the following inry numer to deiml. 8 6 5 3 566438 36. 5 4-364.5 5,5.3 Convert the following inry numers se to the orresponding otl se 8 nd hedeiml se 6. D 6 35 8 8B 6 3 8 35 6 465 8 d DE9 6 57 8 e. 9. 6. 5. 8.4 Convert the following hedeiml numers se 6 to the orresponding otl se 8. 94D 6 455 8 9E.7A 6.. 36.364 8.5 Convert the otl se 8 numer 455 8 to the orresponding hedeiml numer s6. 455 8 94D 6.6 Write the hedeiml se 6 numer BAC 6 in deiml form s. BAC 6 6 6 6 566 988.7 Wht hrterizes Gry odes, nd how n they e designed? Gry odes hve the distne "one" etween odewords. There is never more thn one it t time tht hnges in the trnsitions from one odeword to the net. If one wnts to onstrut n N-it Gry ode n do this from the ode for the N- its. First, follow the N- it ode with "" s the it N, then ontinue to the net hlf of the N- ode gin ut with ode words in reverse order, with "" s it N. This is "mirrored inry ode." This is how do you do 3-it Gry ode from -it Gry ode: is -it Gry ode. is the ode with "" dded s it 3. is the -it ode in reverse order. is thereversed ode with "" dded s it 3. All together the 3-it Gry ode eomes: This is not the only possile 3-it Gry ode, nother possile ode for the three it re. In generl it is the "refleted inry ode" you men when you tlk out Gry ode..8 Type the following signed numers with inry two's omplement nottion, 6, 5, 4, 3,,,. -3 3-3 5 3

- - 7 38 3 4 38 d -64 64 is to ig positive numer! -64 64.9 Type the following signed numers with inry one's omplement nottion, 6, 5, 4, 3,,,. -3 3-3 4-6 38 38 d - 7 Digitl rithmeti. Add y hnd the following pir of inry numers... d... Add or sutrt ddition with orresponding negtive numers the following numers. The numers shll e represented s inry 4-it numers Nile in two's omplement form.. 4 7 8 d -3 5 - - -8 8-8 -3 3-3 -5 5-5.3 Multiply y hnd following pirs of unsigned inry numers... d.. 3

.4 Divide y hnd following pirs of unsigned inry numers. / / If the division is integer division the nswer of is the integer..5 Assume tht 3-it flot is stored in register: 4C8 6 wht rel deiml numer is this? 3-it floting point numers re stored normlized s. One sign it, 8 its for the -eponent epressed s n eess-7, 3 its for signifind. Sine ll numers re strting with "" this is not needed to e stored, it is impliitly understood. Eess-7 mens tht numer 7 is dded to ll eponents, they re therefore lwys stored s positive numers. This hs the dvntge tht floting point numers n e sized s if they were integers!.6 The mimum quntiztion error ours etween 4 nd 6 or etween -6 nd -4. The error is 6-4/. Any representtion of the numer does not eist, you n hoose to use the smllest positive nd smllest negtive numers s nd -. This is done in the IEEE stndrd. 33

.7 Flot ddition Fot multiplktion this is simpler thn ddition! 34

Sets nd Cues Venn-digrm representtion 3. Proof of the distriutive lw with the help of Venn digrms. y z y z y z y z 3. Proof of De Morgn's lw using the Venn digrm. y y y y 3.3 The minterms plement in three vriles Venn digrm. 35

Venn digrm method lerly shows the oolen reltionships, ut re diffiult to use for more thn three vriles. It is imprtil to onvert to omputer lgorithm. 3.4 Represent the following funtion of three vriles, s 3-dimensionl ue with Gry-oded orner. f,, m,,3, 4,6 Use the ue to to simplify the funtion.. The ui representtion is hrd to visulize for more thn three dimensions, ut the minimiztion method n e esily defined for ny numer of vriles nd dimensions, nd then form the sis for omputer lgorithms. 36

37 Boolen lger nd gtes 4. d d d d f f...... } { onsensus f d f e f f onsensus f } { g d y y d d d d d d d d f } { h demorgn f } { i demorgn f } { 4. Prove lgerilly tht the following reltionships re vlid. 3 3 LHS:...... 3 3 3 LHS: 3 3 3 3 3 3 3 3 LHS: 3 3 3 d 3 3 LHS: 3 3 3 4.3 Simplify the following three epressions s muh s possile. z y yz remove onsensus yz z y yz z y z y } { y y y y y y y y y 4.4 Simplify the following epressions s muh s possile.

38 4.5 4.6 simplify f, relized y the figure gtes, s fr s possile, nd give the nme of the funtion. It will e n XNOR funtion. 4.7 4.8 Indite the logil epressions for A, B, C nd D. e e D e e C e e B e e A 4.9 Simplify the omple epressions elow s muh s possile. funtion XOR

4. Show tht This time we re proving the reltionship with so-lled "perfet indution." It involves diretly inserting ll four omintions of the two vriles in the vrious epressions. If the epressions hs the sme truth tle so they're equivlent. When the vriles re few, this non lgeri method old e used. LHS : RHS : LHS RHS 4. The figure shows the interntionl stndrd gte symols. Nme the gtes nd drw the orresponding Amerin gte symols. AND OR NOT NAND NOR XOR XNOR 4. From tet to Boolen epression. u 4 5 u 5 u 3 4 5 u 3 4 5 3 4 5 39

The truth tle, SoP nd PoS form, omplete logi 5. Contts lwys depited in the unffeted position. To get the light to shine you should simultneously press the numers "4" nd "" ie ontt d nd h. Plese note tht you must not press down ny other ontts! The logil funtion the light eomes: f d e f g h i k Code lok is deoder, tht deodes single minterm in the truth tle. 5. f f Funtion on SoP-norml form: f Funtion on PoS-norml form: f 5.3 f, y, z y yz z yz yz yz yz yz yz f, y, z m, f, y, z 5.4 f, y, z y yz y z y y z z yz y y z,,,, M,7 y z y z m,, 3, 4, 5, 6 yz y y yz y z yz y z yz yz y yz y yz y yz yz yz y z z yz y z z yz yz yz yz yz yz yz yz yz yz yz yz yz yz yz yz f, y, z m,,,, m, 4, 5, 6, 7 f, y, z M,,3 y z y z y z yz y 5.5 & & 5.6 4

5.7 Prity iruit for even prity, the numer of ones must e even,, or 4 for t the output. d J 3 4 5 6 7 8 9 3 4 5 Hlf of the rows in the truth tle re. This funtion is not possile to minimize, ut ll 8 minterms need to e inluded in the SP form! J d d d d d d d d Anyone who lredy knows the Krnugh mp n diretly see tht no "groupings" re possile. With NOR gtes the PoS form is etter suitle. J d d d d d d d d 4

Krnugh mp 6. 6. d f d d d f d d 6.3 6.4 f d f d 6.5 Truth tle nd Krnugh mp. The minimized funtion is otined y grouping of the 's in the Krnugh mp. The funtion inverse is otined if :s re grouped together "wrongly s if they were 's. f 3,,, m,, 4, 8,, f? f? 3 f 3 4 5 6 7 8 9 3 4 5 4

f f { : s s: s } 6.6 Truth tle nd Krnugh mp. The minimized funtion is otined y grouping of the 's in the Krnugh mp. The funtion inverse is otined if :s re grouped together "wrongly s if they were 's. f 3,,, M,, 4, 5,,, 4, 5 f? f? 3 f 3 4 5 6 7 8 9 3 4 5 f 3 3 3 f { : s s : s } 3 3 3 43

6.7 Truth tle nd Krnugh mp. The minimized funtion is otined y grouping of the 's in the Krnugh mp. The funtion inverse is otined if :s re grouped together "wrongly s if they were 's. f 3,,, m,, 3, 4, 6, 7, 8, 9,,, 3, 4 f? f? 3 f 3 4 5 6 7 8 9 3 4 5 f 3 3 f { : s s : s } 3 3 44

6.8 f 3,,, m3, 5, 7, d6, 5 f? f? f 3 f 3 6.9 f 3,,, m, 4, 5 d, 3, 6, 7,8,9,,3 f? f? f f or f 45

6. Krnugh mp for five vriles. The left digrm is for 4 nd the right for 4. If the sme grouping n e mde in oth digrms then the vrile 4 or 4 is omitted, otherwise it hs to e inluded. f 4, 3,,, f? f? 4 3 3 4 f f 4 3 3 4 4 46

MOS-trnsistors nd digitl iruits 7. This is CMOS-inverter. 7. Y A. This is CMOS-NAND-gte. Y A B. 7.3 This is CMOS-OR-gte. Y A B. 47

7.4 The iruit is n inverter with THREE-stte output. When EN eomes the irled portion "plugged in" nd Y A the reltionship etween Y nd A is then inverted,. When EN eomes the irled portion "unplugged. Output eomes disonneted nd in third stte, eept nd there is stte "disonneted". Sine the output Y now is disonneted it is no longer ffeted y the input A. THREE-stte outputs re used to mke it possile to nvänds för tt gör det möjligt to onnet mny outputs to single line us. Severl iruits outputs n utilize ommon input line, provided tht only one of the iruits re tive EN t time the others hs EN nd re disonneted. 7.5 CMOS-iruits osists of two suiruits tht eh other's inverses. The Pull-up-net, PUN, trnsfers to the output while the pull-down network trnsfers. If one nlyzes the Pull-down network, one therefore get the funtion Y inverted. Y A C B Y A C B AC B A C B A C B Pull-up-net shll hve A nd C in prllell nd then in series with B. The use of PMOS-trnsistors inverts the vriles A, B nd C. A C B 48

Comintoril iruits 8. X U X u 5 u 4 u 3 u u u 4 3 9 4 6 5 5 6 36 7 49 In the truth tle we n see tht u llwys is equl to. u output n therefore e diretly onneted V ground so it will hve the output onstnt. We n lso see tht u llwys is equl to. u output n therefore e diretly onneted to the input. The other epressions re otined y using their Krnugh mps. 8. X 3 U u u u 3 7 3 5 4 In the truth tle we n see tht u nd 3 re equl why u diretly n e onneted to 3. u 3. The other epressions re otined y using their Krnugh mps. 49

Gte iruits: 8.3 Truth tle r 5 r 4 r 3 r r y 4 y y - - - - - - - - - - 5

8.4 7 4 8 4 7 4 y 8 y 4 y y 3 3 4 4 5 5 6 6 8 7 9 8 9 y y y y 8 4 7 4 7 7 7 7 7 7 7 Two of the AND-gtes n e ommon to the y 8,y nd y 8,y,y -iruits. 8.5 5

8.6 A 4- multipleer used s funtion genertor for the OR-funtion. 8.7 M 3 4 5 6 M 7 M M g h g h 5

8.8 In order to mke full dder we need to use the the upper MUX to the sum funtion, nd the ottom MUX, whih is onneted to C OUT, is used for the Crry-funtion. In sted of we hoose C IN. In order for the upper MUX to e onneted to the logi element output the output mu must e ontrolled with insted of with 3. A B C IN C OUT 8.9 53

8. Alterntively, the XOR gte is lso used to MUX input nd. 54

Sequentil iruits, lthes nd loked flip-flops 9. The figure shows SR-lth, ut t the end of the input-sequene the foridden input omintion S, R will our. The outputs Utgångrn will not e eh others inverses for this omintion. For NOR-gtes is loking input signl, therefore Q s long s S is left t. 9. 9.3 9.4 9.5 JK-flip-flop n e used s T-flip-flop or s D-flip-flop. When flip-flops re onneted to eh other there re usully the inverted outputs ville, you will then not require the inverter to mke the JK flip flop to D flipflop. 55

9.6 T t pd t f T t s pd t s 3 [ ns] MHz 9.7 56

57 Sequentil iruits. From the iruit digrm one n e derive the following epressions: q q q q q q q No output deoder eists the flip-flop stte is diretly used s output. Moore model is to e used.. From the iruit digrm one n e derive the following epressions: q q q q q q q q q q q q U Sine U depends diretly of must Mely model e used.

.3 From the iruit digrm one n e derive the following epressions: U q q q q q q q q q q q Sine U only depends on the stte nd is is independent of must Moore model e used..4 Stopping ondition: Z3 Loss ondition: Z7 Isolted sttes: Z.5 Z: CP i Z Z Z Z4 Z6 Z Z Z Z Z3.6 From stte digrm to oded stte tle. 58

.7 Stte enoding Binry: Stte enoding Gry: 59

Stte enoding One hot: This is how to do reset to with CLR inputs for the Bin/Gry stte enoding, nd to with PRE/CLR inputs for the one hot stte enoding. 6

.8 Si stte requires three flip-flops. There re 8 sttes in totl, two sttes whih re not inluded in the sequene. To e on the sfe side we speify wht should hppen with these sttes, so tht the ounter will not get stuk t Z or Z7. Equtions with EN EN net stte sme : Equtions with S6 S6 net stte is : q q q.9 ' EN q ' EN q ' EN q EN q EN q EN q q q q '' q '' q '' q ' S6 ' S6 ' S6 6

. 6

63. Groups with sme output:,,,, e d f P Emine net sttes:,,,,,,,,,,,,,,,,,,,,,,,,,,,, f e f e f d f d f f f f e d e d f e d f e d i i i i i i i i i i i i Groups with sme susequent stte output: 3,, P P e d f P.

Asynhronous sequentil iruits. G BC AB { Hzrdfree} G BC AB AC. To the left is SR-lth mde y two gtes with feedk. To the right the iruit is drwn s Mooreomptile sttemhine. Moore-mhine. Q R S Q R S Q R S Q S R RQ When deling with synhronous sttemhines the oded stte tle is used to e nmed eittion tle. For eh input olumn, there must e t lest one stte where Q Q. Suh onditions re stle nd they re usully mrked y irle. The stte digrm follows from the eittion tle. The stte tle is nmed flow tle when working with synhronous stte mhines...3 64

.4 At positive edge C hnges from to nd when C the MUX onnets the upper flip-flop q to the output. At negtive edge C hnges from to nd C the MUX onnets the lower flip-flop q to the output. The result is D-flip-flop tht rets on oth edges of the lok..5 There re four input omintions CD nd two output omintions Q. A totl of 8 possile sttes CDQ.: Possile input/output omintions Present stte Net stte Comment Stte tg CDO CDO CDO A Output O gets D input vlue when C hnges vlue B C No hnge of O when D hnges vlue D E F G H Flow tle stile sttes mrked in old font Present Net Stte Output stte CD A A C - E B B D - E C A C H - D B D H - E A - G E F A - H F G - D G E H - D H F We see immeditely tht no minimiztion my e done y stte equivlene lsses, euse ll eight sttes hve different outputs where they hve stle sttes, nd where they hve do not res in the tle. Merger-digrm: 65

The minized flow tle Flow Tle stle sttes mrked s old Present Net Stte Output stte CD A A A F E B B B F E E A B E E F A B F F Assign sttes, do Krnugh-minimiztion nd derive the oolen equtions. Possile stte ssignements re E, B, A, F nd their rottions nd mirror solutions: Possile stte ssignments A F B E One of the resulting stte tles Flow Tle stle sttes mrked s old Present Net Stte Output stte CD And the orresponding Krnugh digrms nd Boolen epressions eomes: S S O S CD S D S S C S C D S CD S S C S S C D S S S S C D 66

.6 Derive the Boolen epressions for the stte vriles. Answer: Y Y Y Y Y C Y C Y Y I Y I C Y C Derive the eittions tle. Whih funtion dshed re in the inner loops. The two inner loops re hzrd-free MUX:es! Derive the flow tle, ssign symoli sttes nd drv FSM. Identify the funtion of the synhronous iruit. Whih flip-flop is it? Positive edge-triggered T-flip-flop. 67

.7 Folow the timing digrm nd rete new stte for every omintion tht hs not een efore. In stte we wits for the strtedge, then input is impossile mrked with *. The Protool prohiits hnge of dt SDA when SCL is high. Therefore input is impossile in stte e mrked with *. This gives us two etr don t re positions in the tle. You n diretly see whih sttes tht n e merged. As stte ode ssignement the Gry-ode n e used.,, de, nd. n e used s don t re eept from. The groups re forming ontiguous res in Krnughdigrm nd therefore hzrd free if the networks hve two levels. Relising with optionl gtes. 68

Address deoding of memories nd I/O iruits. A dynmi RAM-memory onsits of some 56Mit memory hips orgnised s 3 M 8. How mny hips re needed for 56M 64? Memory N 56M M 64 it. Chip p 3M q 8 it. Numer of olumns k M/q 64/8 8. Numer of rows r N/p 56M/3M 8. Totl numer of hips K r k 8 8 64. How mny memory hips re needed for 5M 7? wht n e the reson for the unusul widh 7 of the memory? Memory N 5M M 7 it. Chip p 3M q 8 it. Numer of olumns k M/q 7/8 9. Numer of rows r N/p 5M/3M 6. Totl numer of hips K r k 9 6 44. The unusul width 7 64 8. The 8 etr its re used for orreting single errors nd deteting doule errors. Not shown in this ourse.. A ertin 6 it proessor n ddress 4 its. Memory Spe is divided etween ROM, SRAM nd IO iruits. Address deoding is done using 3:8-deoder. How lrge is the RAM in the figure? Wht is the ddress rnge epressed in hedeiml numers? Memory hip: p 5k q 8 itr Memory: r 3 k K 3 6 M k q 8 6 itr N p r 5k 3,5M Address rnge: 69

How do you hnge the ddress rnge to 98 AFFFFF? Chnge the ddress rnge to 48 5FFFFF? We Interhnges A3 nd A! d ROM-memory is M 6 it nd the ddress rnge is nd forwrd. ROM Chip is 5k 8. How mny hips re needed? Memory: How is the deoder onneted? N M 45k word is M 6 it How re the memory hips onneted? Memory hip: Whih is the ddress re for the ROM epressed in p 5 k yte width q 8 it hedeiml numers. Numer of hip rows r N/p 45k/5k 4 Numer of hip olumns k M/q 6/8 Totl of hips K r k 4 8 7

mmm mmmm mmmm mmmm mmmm - F F F F -7FFFF - F F F F 8-FFFFF - F F F F -7FFFF - F F F F 8-FFFFF Totl ROM FFFFF e Whih ddress rnge is free for SRAM nd IO-iruits? mmm mmmm mmmm mmmm mmmm - F F F F -7FFFF - F F F F 8-FFFFF - F F F F 3-37FFFF - F F F F 38-3FFFFF Possile SRAMI/O ddresses 3FFFFF.3 Connet 8 register memory-mpped peripherl devie I/O to CPU. The CPU hs 6-it dt us only 8 its re used y the hip, nd 4 it ddress us. Use 3:8-deoder nd if needed gtes. The peripherl devie must e onneted so tht it hs register ddresses 7....... 3.. I/O ddresses, 7FFFF is to e found, ording to the previous eerise, t the 3:8-deoder output 4. It deodes A3... A9, the peripherl itself deodes A... A, 7

4.. 5.. 6.. 7.. the rest we hve to deode with n nd-gte wht is ment y inomplete deoding? For full deoding, we used &-gte with 7 inputs! Sometimes you mke prtil deoding. Then you omits ddress signls nd thus n use gte with fewer inputs I/O devie ddressing is miguous, it n e ddressed with mny different ddresses, ut the one who writes the progrm ode determines whih ddresses to use. The min thing is to ensure tht the I/O devie ddresses do not ollide with ny other devie ddresses. 7

73