2. If you purchased this book within the United States or Canadayou should be aware thatit has been wrongfully imported without theapproval of the Publisher or the Author.Director ofDevelopment:Vern AnthonyEditorial Assistant: Lara DimmickProductionEditor: Stephen C. RobbProduction Coordination: PeggyHood,TechBooks/GTSDesign Coordinator: Diane Y. ErnsbergerCoverDesigner: Jason MooreCover Art: Getty OneProduction Manager: MattOttenwellerMarketing Manager: Ben LeonardThis book was set inTimesEuropa Roman by TechBooks/GTSYork, PA Campus. It wasprintedand bound by Courier Kendallville, Inc.The cover was printed byPhoenixColor Corp.MultiSIM is a trademark of ElectronicsWorkbench.Altera is a trademark and service mark of AlteraCorporation in the United States andother countries. Alteraproducts are the intellectual property of Altera Corporation andareprotected by copyright laws and one or more U.S. and foreignpatents and patent ap-plications.Copyright 2007 by PearsonEducation, Inc., Upper Saddle River, New Jersey 07458.PearsonPrentice Hall. All rights reserved. Printed in the United States ofAmerica.Thispublication is protected by Copyright and permissionshould be obtained from the pub-lisherprior to any prohibitedreproduction, storage in a retrieval system, or transmissionin anyform or by any means, electronic, mechanical, photocopying,recording, or likewise.For information regarding permission(s),write to: Rights and Permissions Department.Pearson Prentice Hallis a trademark of Pearson Education, Inc.Pearson is a registeredtrademark of Pearson plcPrentice Hall is a registered trademark ofPearson Education, Inc.Pearson Education Ltd. Pearson EducationAustralia Pty. LimitedPearson Education Singapore, Pte. Ltd.Pearson Education North Asia Ltd.Pearson Education Canada, Ltd.Pearson Educacin de Mexico, S.A. de C.V.Pearson EducationJapanPearson Education Malaysia, Pte. Ltd.Pearson Education, UpperSaddle River,New Jersey10 9 8 7 6 5 4 3 2 1ISBN: 0-13-173969-7 3.Digital SystemsPrinciples and Applications 4. DigitalSystemsPrinciples and ApplicationsRonald J. TocciMonroe CommunityCollegeNeal S.WidmerPurdue UniversityGregory L. MossPurdueUniversityTENTH EDITIONUpper Saddle River, New JerseyColumbus, Ohio5. Library of Congress Cataloging-in-Publication DataTocci, RonaldJ.Digital systems : principles and applications / Ronald J.Tocci,Neal S.Widmer, Gregory L. Moss.10th ed.p. cm.Includesbibliographical references and index.ISBN 0-13-172579-31. DigitalelectronicsTextbooks. I. Widmer, Neal S. II. Moss, Gregory L.III.Title.TK7868.D5T62 2007621.381dc222005035835Director ofDevelopment:Vern AnthonyEditorial Assistant: Lara DimmickProductionEditor: Stephen C. RobbProduction Coordination: Peggy Hood,TechBooks/GTSDesign Coordinator: Diane Y. ErnsbergerCover Designer:Jason MooreCover Art: Getty OneProduction Manager: MattOttenwellerMarketing Manager: Ben LeonardThis book was set inTimesEuropa Roman by TechBooks/GTSYork, PA Campus. It wasprintedand bound by Courier Kendallville, Inc. The cover was printed byPhoenixColor Corp.MultiSIM is a trademark of ElectronicsWorkbench.Altera is a trademark and service mark of AlteraCorporation in the United States andother countries. Alteraproducts are the intellectual property of Altera Corporation andareprotected by copyright laws and one or more U.S. and foreignpatents and patent ap-plications.Copyright 2007, 2004, 2001, 1998,1995, 1991, 1988, 1985, 1980, 1970 by PearsonEducation, Inc., UpperSaddle River, New Jersey 07458. Pearson Prentice Hall. Allrightsreserved. Printed in the United States of America. Thispublication is protected byCopyright and permission should beobtained from the publisher prior to any prohibitedreproduction,storage in a retrieval system, or transmission in any form or byany means,electronic, mechanical, photocopying, recording, orlikewise. For information regardingpermission(s), write to: Rightsand Permissions Department.Pearson Prentice Hall is a trademark ofPearson Education, Inc.Pearson is a registered trademark of PearsonplcPrentice Hall is a registered trademark of Pearson Education,Inc.Pearson Education Ltd. Pearson Education Australia Pty.LimitedPearson Education Singapore, Pte. Ltd. Pearson EducationNorth Asia Ltd.Pearson Education Canada, Ltd. Pearson Educacin deMexico, S.A. de C.V.Pearson EducationJapan Pearson EducationMalaysia, Pte. Ltd.10 9 8 7 6 5 4 3 2 1ISBN: 0-13-172579-3 6. Toyou, Cap, for loving me for so long; and for the millionand oneways you brighten the lives of everyone you touch.RJTTo my wife,Kris, and our children, John, Brad, Blake,Matt, and Katie: thelenders of their rights to my time andattention that this revisionmight be accomplished.NSWTo my family, Marita, David, and Ryan.GLM7. viiPREFACEThis book is a comprehensive study of the principlesand techniques of mod-erndigital systems. It teaches thefundamental principles of digital systemsand covers thoroughly bothtraditional and modern methods of applying dig-italdesign anddevelopment techniques, including how to manage asystems-levelproject.The book is intended for use in two- andfour-year programs intechnology, engineering, and computer science.Although a background inbasic electronics is helpful, most of thematerial requires no electronicstraining. Portions of the text thatuse electronics concepts can be skippedwithout adversely affectingthe comprehension of the logic principles.General ImprovementsThetenth edition of Digital Systems reflects the authors views ofthedirection of modern digital electronics. In industry today, wesee the impor-tanceof getting a product to market very quickly.Theuse of modern designtools, CPLDs, and FPGAs allows engineers toprogress from concept to func-tionalsilicon very quickly.Microcontrollers have taken over many applica-tionsthat once wereimplemented by digital circuits, and DSP has beenused to replacemany analog circuits. It is amazing that microcontrollers,DSP, andall the necessary glue logic can now be consolidated onto asingleFPGA using a hardware description language with advanceddevelopmenttools. Todays students must be exposed to these moderntools, even in anintroductory course. It is every educatorsresponsibility to find the bestway to prepare graduates for thework they will encounter in their profes-sionallives.The standardSSI and MSI parts that have served as bricks and mortarin thebuilding of digital systems for nearly 40 years are now nearingobso-lescence.Many of the techniques that have been taught overthat time havefocused on optimizing circuits that are built fromthese outmoded devices.The topics that are uniquely suited toapplying the old technology but do notcontribute to anunderstanding of the new technology must be removed from 8. viiiPREFACEthe curriculum. From an educational standpoint, however,these small ICs dooffer a way to study simple digital circuits, andthe wiring of circuits usingbreadboards is a valuable pedagogicexercise.They help to solidify conceptssuch as binary inputs andoutputs, physical device operation, and practicallimitations, usinga very simple platform. Consequently, we have chosen tocontinue tointroduce the conceptual descriptions of digital circuits andtooffer examples using conventional standard logic parts. Forinstructors whocontinue to teach the fundamentals using SSI and MSIcircuits, this editionretains those qualities that have made thetext so widely accepted in thepast. Many hardware design tools evenprovide an easy-to-use design entrytechnique that will employ thefunctionality of conventional standard partswith the flexibility ofprogrammable logic devices. A digital design can bedescribed usinga schematic drawing with pre-created building blocks thatareequivalent to conventional standard parts, which can be compiledandthen programmed directly into a target PLD with the addedcapability ofeasily simulating the design within the samedevelopment tool.We believe that graduates will actually apply theconcepts presented inthis book using higher-level descriptionmethods and more complex program-mabledevices.The major shift inthe field is a greater need to understand thedescription methods,rather than focusing on the architecture of an actualde-vice.Software tools have evolved to the point where there islittle need for con-cernabout the inner workings of the hardwarebut much more need to focuson what goes in, what comes out, and howthe designer can describe what thedevice is supposed to do.We alsobelieve that graduates will be involved withprojects usingstate-of-the-art design tools and hardware solutions.This bookoffers a strategic advantage for teaching the vital new topicofhardware description languages to beginners in the digitalfield.VHDL isundisputedly an industry standard language at thistime, but it is also verycomplex and has a steep learning curve.Beginning students are often dis-couragedby the rigorousrequirements of various data types, and they strug-glewithunderstanding edge-triggered events in VHDL. Fortunately,Alteraoffers AHDL, a less demanding language that uses the samebasic conceptsas VHDL but is much easier for beginners to master.So, instructors can optto use AHDL to teach introductory studentsor VHDL for more advancedclasses. This edition offers more than 40AHDL examples, more than 40VHDL examples, and many examples ofsimulation testing. All of these designfiles are available on theenclosed CD-ROM.Alteras latest software development system isQuartus II. The MAXPLUS II software that has been used for manyyears is still popular in indus-tryand is supported by Altera. Itsmain drawback is that it does not programthe latest devices. Thematerial in this text does not attempt to teach apar-ticularhardware platform or the details of using a softwaredevelopment sys-tem.New revisions of software tools appear sofrequently that a textbookcannot remain current if it tries todescribe all of the details.We have triedto show what this tool cando, rather than train the reader how to use it. How-ever,tutorialshave been included on the accompanying CD-ROM that makeit easy tolearn either software package.The AHDL and VHDL examplesarecompatible with either Quartus or MAXPLUS systems. The timingsimula-tionswere developed using MAXPLUS but can also be done withQuartus.Many laboratory hardware options are available to users ofthis book. Anumber of CPLD and FPGA development boards areavailable for studentsto use in the laboratory. There are severalearlier generation boards similarto Alteras UP2 that containMAX7000 family CPLDs. A more recent exampleof an available board isthe UP3 board from Alteras university program (seeFigure P-l),which contains a larger FPGA from the Cyclone family. An even 9.PREFACE ixnewer board from Altera is called the DE2 board (seeFigure P-2), which hasa powerful new 672-pin Cyclone II FPGA and anumber of basic features suchas switches, LEDs, and displays aswell as many additional features for moreadvanced projects. Moredevelopment boards are entering the market everyyear, and many arebecoming very affordable.These boards, along withpow-erfuleducational software, offer an excellent way to teach anddemonstratethe practical implementation of the concepts presentedin this text.The most significant improvements in the tenth editionare found in Chap-ter7. Although asynchronous (ripple) countersprovide a good introduction tosequential circuits, the real worlduses synchronous counter circuits. Chapter7 and subsequent exampleshave been rewritten to emphasize synchronouscounter ICs and includetechniques for analysis, cascading, and using HDL todescribe them.A section has also been added to improve the coverage ofstatemachines and the HDL features used to describe them. Otherimprovementsinclude analysis techniques for combinational circuits,expanded coverage of555 timer applications, and better coverage ofsigned binary numbers.FIGURE P-1 Alteras UP3developmentboard.FIGURE P-2 Alteras DE2development board. 10. x PREFACEOurapproach to HDL and PLDs gives instructors several options:1. TheHDL material can be skipped entirely without affectingthecontinuity of the text.2. HDL can be taught as a separate topicby skipping the materialinitially and then going back to the lastsections of Chapters 3, 4, 5,6, 7, and 9 and then covering Chapter10.3. HDL and the use of PLDs can be covered as the courseunfoldschapter by chapterand woven into the fabric of thelecture/labexperience.Among all specific hardware descriptionlanguages, VHDL is clearly theindustry standard and is most likelyto be used by graduates in their careers.We have always felt thatit is a bold proposition, however, to try to teach VHDLin anintroductory course.The nature of the syntax, the subtledistinctions inobject types, and the higher levels of abstractioncan pose obstacles for abeginner. For this reason, we have includedAlteras AHDL as the recom-mendedintroductory language for freshmancourses.We have also includedVHDL as the recommended language formore advanced classes or introduc-torycourses offered to moremature students.We do not recommend trying tocover both languagesin the same course. Sections of the text that cover thespecifics ofa language are clearly designated with a color bar in themargin.The HDL code figures are set in a color to match thecolor-coded text expla-nation.The reader can focus only on thelanguage of his or her choice and skipthe other. Obviously, we haveattempted to appeal to the diverse interests ofour market, but webelieve we have created a book that can be used in multi-plecoursesand will serve as an excellent reference after graduation.ChapterOrganizationIt is a rare instructor who uses the chapters of atextbook in the sequence inwhich they are presented. This book waswritten so that, for the most part,each chapter builds on previousmaterial, but it is possible to alter the chap-tersequencesomewhat. The first part of Chapter 6 (arithmetic operations)can becovered right after Chapter 2 (number systems), although this willleadto a long interval before the arithmetic circuits of Chapter 6are encountered.Much of the material in Chapter 8 (ICcharacteristics) can be covered earlier(e.g., after Chapter 4 or 5)without creating any serious problems.This book can be used eitherin a one-term course or in a two-term se-quence.In a one-termcourse, limits on available class hours might requireomitting sometopics. Obviously, the choice of deletions will depend onfac-torssuch as program or course objectives and studentbackground. A list ofsections and chapters that can be deleted withminimal disruption follows: Chapter 1: All Chapter 2: Section 6Chapter 3: Sections 1520 Chapter 4: Sections 7, 1013 Chapter 5:Sections 3, 2327 Chapter 6: Sections 57, 11, 13, 1623 Chapter 7:Sections 914, 2124 Chapter 8: Sections 10, 1419 11. PREFACExiFIGURE P-3 Letters denotecategories of problems,and asterisksindicate thatcorresponding solutionsare provided at the end ofthetext. Chapter 9: Sections 5, 9, 1520 Chapter 10: All Chapter 11:Sections 7, 1417 Chapter 12: Sections 1721 Chapter 13: AllPROBLEMSETS This edition includes six categories of problems: basic(B),challenging (C), troubleshooting (T), new (N), design (D), and HDL(H).Undesignated problems are considered to be of intermediatedifficulty, be-tweenbasic and challenging. Problems for whichsolutions are printed in theback of the text or on the enclosedCD-ROM are marked with an asterisk (seeFigure P-3).PROJECTMANAGEMENT AND SYSTEM-LEVEL DESIGN Several real-worldexamples areincluded in Chapter 10 to describe the techniques usedto manageprojects. These applications are generally familiar to moststu-dentsstudying electronics, and the primary example of a digitalclock is fa-miliarto everyone. Many texts talk about top-downdesign, but this textdemonstrates the key features of this approachand how to use the moderntools to accomplish it.DATA SHEETS TheCD-ROM containing Texas Instruments data sheetsthat accompanied theninth edition has been removed.The information thatwas included onthis CD-ROM is now readily available online.SIMULATION FILES Thisedition also includes simulation files that can beloaded intoElectronics Workbench Multisim. The circuit schematics ofmany ofthe figures throughout the text have been captured as input filesforthis popular simulation tool. Each file has some way ofdemonstrating the oper-ationof the circuit or reinforcing aconcept. In many cases, instruments are at-tachedto the circuit andinput sequences are applied to demonstrate theconcept presented inone of the figures of the text.These circuits can then bemodifiedas desired to expand on topics or create assignments and tutorials12. xii PREFACEfor students. All figures in the text that have acorresponding simulation fileon the CD-ROM are identified by theicon shown in Figure P-4.IC TECHNOLOGY This new edition continuesthe practice begun with thelast three editions of giving moreprominence to CMOS as the principal ICtechnology in small- andmedium-scale integration applications. This depthof coverage hasbeen accomplished while retaining the substantial coverageof TTLlogic.Specific ChangesThe major changes in the topical coverage arelisted here. Chapter 1. Many explanations covering digital/analogissues have beenupdated and improved. Chapter 2. The octal numbersystem has been removed and the Graycode has been added. A completestandard ASCII code table has been in-cluded,along with newexamples that relate ASCII characters, hex rep-resentation,andcomputer object code transfer files. New material onframing ASCIIcharacters for asynchronous data transfer has also beenadded.Chapter 3. Along with some new practical examples of logicfunctions,the major improvement in Chapter 3 is a new analysistechnique usingtables that evaluate intermediate points in thelogic circuit. Chapter 4.Very few changes were necessary in Chapter4. Chapter 5.A new section covers digital pulses and associateddefinitionssuch as pulse width, period, rise time, and fall time.The terminologyused for latch circuit inputs has been changed fromClear to Reset inorder to be compatible with Altera componentdescriptions.The definitionof a master/slave flip-flop has beenremoved as well. The discussion ofSchmitt trigger applications hasbeen improved to emphasize their rolein eliminating the effects ofnoise. The inner workings of the 555 timerare now explained, andsome improved timing circuits are proposed thatmake the device moreversatile. The HDL coverage of SR and D latcheshas been rewrittento use a more intuitive behavioral description, andthe coverage ofcounters has been modified to focus on structural tech-niquestointerconnect flip-flop blocks. Chapter 6. Signed numbers arecovered in more detail in this edition,particularly regarding signextension in 2s complement numbers andarithmetic overflow. A newcalculator hint simplifies negation of binarynumbers represented inhex. A number circle model is used to compareFIGURE P-4 Theicondenotes a correspondingsimulation file on theCD-ROM. 13.PREFACE xiiisigned and unsigned number formats and help students tovisualizeadd/subtract operation using both. Chapter 7. This chapterhas been heavily revised to emphasize synchro-nouscounter circuits.Simple ripple counters are still introduced to pro-videa basicunderstanding of the concept of counting and asynchronouscascading.After examining the limitations of ripple counters in Section2,synchronous counters are introduced in Section 3 and used in allsubse-quentexamples throughout the text. The IC counters presentedare the74160, 161, 162, and 163.These common devices offer anexcellent assort-mentof features that teach the difference betweensynchronous and asyn-chronouscontrol inputs and cascadingtechniques.The 74190 and 191 areused as an example of a synchronousup/down counter IC, further rein-forcingthe techniques required forsynchronous cascading. A new sectionis devoted to analysistechniques for synchronous circuits using JK and Dflip-flops.Synchronous design techniques now also include the use ofDflip-flop registers that best represent the way sequentialcircuits are im-plementedin modern PLD technology. The HDL sectionshave been im-provedto demonstrate the implementation ofsynchronous/asynchronousloading, clearing, and cascading. A newemphasis is placed on simulationand testing of HDL modules. Statemachines are now presented as a topic,the traditional Mealy andMoore models are defined, and a new trafficlight control system ispresented as an example. Minor improvements havebeen made in thesecond half of Chapter 7 also. All of the problems at theend ofChapter 7 have been rewritten to reinforce the concepts. Chapter8.This chapter remains a very technical description of thetech-nologyavailable in standard logic families and digitalcomponents. Themixed-voltage interfacing sections have beenimproved to cover low-voltagetechnology. The latest TexasInstruments life-cycle curve showsthe history and current positionof various logic series between intro-ductionand obsolescence.Low-voltage differential signaling (LVDS) isintroduced as well.Chapter 9. The many different building blocks of digital systemsare stillcovered in this chapter and demonstrated using HDL. Manyother HDLtechniques, such as tristate outputs and various HDLcontrol structures,are also introduced. A 74ALS148 is described asanother example of anencoder.The examples of systems that usecounters have all been updatedto synchronous operation.The serialtransmission system using MUX andDEMUX is particularly improved.The technique of using a MUX toimplement SOP expressions has beenexplained in a more structured wayas an independent study exercisein the end-of-the-chapter problems. Chapter 10. Chapter 10, whichwas new to the ninth edition, has re-mainedessentially unchanged.Chapter 11.The material on bipolar DACs has been improved, and anex-ampleof using DACs as a digital amplitude control for analogwaveformsis presented. The more common A/D converter accuracyspecification inthe form of / LSB is explained in this edition.Chapter 12. Minor improvements were made to this chapter toconsolidateand compress some of the material on older technologiesof memory suchas UV EPROM. Flash technology is still introducedusing a first-generationexample, but the more recent improvements,as well as some of the appli-cationsof flash technology in modernconsumer devices, are described. Chapter 13. This chapter, whichwas new to the ninth edition, has beenupdated to introduce the newCyclone family of PLDs. 14. xiv PREFACERetained FeaturesThisedition retains all of the features that made the previous editionssowidely accepted. It utilizes a block diagram approach to teachthe basic logicoperations without confusing the reader with thedetails of internal operation.All but the most basic electricalcharacteristics of the logic ICs are withhelduntil the reader has afirm understanding of logic principles. In Chapter 8, thereader isintroduced to the internal IC circuitry. At that point, the readercaninterpret a logic blocks input and output characteristics andfit it properlyinto a complete system.The treatment of each newtopic or device typically follows these steps:the principle ofoperation is introduced; thoroughly explained examplesandapplications are presented, often using actual ICs; short reviewquestions areposed at the end of the section; and finally, in-depthproblems are availableat the end of the chapter. These problems,ranging from simple to complex,provide instructors with a widechoice of student assignments. These prob-lemsare often intended toreinforce the material without simply repeatingthe principles. Theyrequire students to demonstrate comprehension of theprinciples byapplying them to different situations.This approach alsohelpsstudents to develop confidence and expand their knowledge ofthe material.The material on PLDs and HDLs is distributedthroughout the text, withexamples that emphasize key features ineach application. These topics ap-pearat the end of each chapter,making it easy to relate each topic to the gen-eraldiscussionearlier in the chapter or to address the generaldiscussionseparately from the PLD/HDL coverage.The extensivetroubleshooting coverage is spread over Chapters 4 through12 andincludes presentation of troubleshooting principles andtechniques,case studies, 25 troubleshooting examples, and 60 realtroubleshooting prob-lems.When supplemented with hands-on labexercises, this material can helpfoster the development of goodtroubleshooting skills.The tenth edition offers more than 200worked-out examples, more than400 review questions, and more than450 chapter problems/exercises. Someof these problems areapplications that show how the logic devices presentedin thechapter are used in a typical microcomputer system. Answers toamajority of the problems immediately follow the Glossary.TheGlossary pro-videsconcise definitions of all terms in the text thathave been highlightedin boldface type.An IC index is provided atthe back of the book to help readers locate eas-ilymaterial on anyIC cited or used in the text. The back endsheets providetables ofthe most often used Boolean algebra theorems, logic gatesummaries,and flip-flop truth tables for quick reference when doingproblems or work-ingin the lab.SupplementsAn extensive complementof teaching and learning tools has been developedto accompany thistextbook. Each component provides a unique function,and each can beused independently or in conjunction with the others.CD-ROM ACD-ROM is packaged with each copy of the text. It containsthefollowing material: MAXPLUS II Educational Version software fromAltera.This is a fullyfunctional, professional-quality, integrateddevelopment environment for 15. PREFACE xvdigital systems that hasbeen used for many years and is still supportedby Altera. Studentscan use it to write, compile, and simulate their de-signsat homebefore going to the lab.They can use the same software toprogramand test an Altera CPLD. Quartus II Web Version software fromAltera. This is the latest develop-mentsystem software from Altera,which offers more advanced featuresand supports new PLD devicessuch as the Cyclone family of FPGAs,found on many of the newesteducational boards. Tutorials. Gregory Moss has developed tutorialsthat have been usedsuccessfully for several years to teachintroductory students how to useAltera MAXPLUS II software. Thesetutorials are available in PDFand PPT (Microsoft PowerPointpresentation) formats and have beenadapted to teach Quartus II aswell.With the help of these tutorials, any-onecan learn to modifyand test all the examples presented in this text,as well as develophis or her own designs. Design files from the textbook figures.More than 40 design files in eachlanguage are presented in figuresthroughout the text. Students can loadthese into the Alterasoftware and test them. Solutions to selected problems: HDL designfiles. A few of the end-of-chapterproblem solutions are availableto students. (All of the HDLsolutions are available to instructorsin the Instructors Resource Manual.)Solutions for Chapter 7problems include some large graphic and HDLfiles that are notpublished in the back of the book but are available onthe enclosedCD-ROM. Circuits from the text rendered in Multisim. Students canopen andwork interactively with approximately 100 circuits toincrease their un-derstandingof concepts and prepare for laboratoryactivities. TheMultisim circuit files are provided for use byanyone who has Multisimsoftware. Anyone who does not have Multisimsoftware and wishes topurchase it in order to use the circuit filesmay do so by ordering it fromwww.prenhall.com/ewb. Supplementalmaterial introducing microprocessors and microcon-trollers.For theflexibility to serve the diverse needs of the manydiffer-entschools, an introduction to this topic is presented as aconvenientbridge between a digital systems course and anintroduction to micro-processors/microcontrollers course.STUDENTRESOURCES Lab Manual: A Design Approach. This lab manual, writtenby GregoryMoss, contains topical units with lab projects thatemphasize simulationand design. It utilizes the Altera MAXPLUS IIor Quartus II software inits programmable logic exercises andfeatures both schematic captureand hardware description languagetechniques. The new edition con-tainsmany new projects andexamples. (ISBN 0-13-188138-8) Lab Manual: A TroubleshootingApproach. This manual, written by JimDeLoach and Frank Ambrosio, ispresented with an analysis and trou-bleshootingapproach and isfully updated for this edition of the text.(ISBN 0-13-188136-1)Companion Website (www.prenhall.com/tocci). This site offersstudents afree online study guide with which they can review thematerial learnedin the text and check their understanding of keytopics. 16. INSTRUCTOR RESOURCES Instructors Resource Manual. Thismanual contains worked-out solutionsfor all end-of-chapter problemsin this textbook. (ISBN 0-13-172665-X) Lab Solutions Manual.Worked-out lab results for both lab manuals arefeatured in thismanual. (ISBN 0-13-172664-1) PowerPoint presentations. Figures fromthe text, in addition to LectureNotes for each chapter, areavailable on CD-ROM. (ISBN 0-13-172667-6) TestGen. A computerizedtest bank is available on CD-ROM. (ISBN 0-13-172666-8)To accesssupplementary materials online, instructors need to requestaninstructor access code. Go to www.prenhall.com, click theInstructor ResourceCenter link, and then click Register Today foran instructor access code.Within48 hours after registering, youwill receive a confirming e-mail including aninstructor accesscode.When you have received your code, go to the site andlog on forfull instructions on downloading the materials you wish touse.ACKNOWLEDGMENTSWe are grateful to all those who evaluated theninth edition and providedanswers to an extensive questionnaire:Ali Khabari,Wentworth Institute ofTechnology; Al Knebel, MonroeCommunity College; Rex Fisher, BrighamYoung University; Alan Niemi,LeTourneau University; and Roger Sash, Uni-versityof Nebraska.Their comments, critiques, and suggestions were givenseriousconsideration and were invaluable in determining the final formofthe tenth edition.We also are greatly indebted to Professor FrankAmbrosio, Monroe Com-munityCollege, for his usual high-quality workon the indexes and the Ins-tructorsResource Manual; and ProfessorThomas L. Robertson, PurdueUniversity, for providing his magneticlevitation system as an example; andProfessors Russ Aubrey and GeneHarding, Purdue University, for their tech-nicalreview of topicsand many suggestions for improvements.We appreci-atethe cooperationof Mike Phipps and the Altera Corporation for theirsupport ingranting permission to use their software package and theirfig-uresfrom technical publications.A writing project of thismagnitude requires conscientious and profes-sionaleditorialsupport, and Prentice Hall came through again in typicalfashion. Wethank the staffs at Prentice Hall and TechBooks/GTS for theirhelpto make this publication a success.And finally, we want to let ourwives and our children know how much weappreciate their support andtheir understanding.We hope that we can even-tuallymake up for allthe hours we spent away from them while we workedon thisrevision.Ronald J.TocciNeal S.WidmerGregory L. Mossxvi PREFACE 17.xviiBRIEF CONTENTSCHAPTER 1 Introductory Concepts 2CHAPTER 2 NumberSystems and Codes 24CHAPTER 3 Describing Logic Circuits 54CHAPTER 4Combinational Logic Circuits 118CHAPTER 5 Flip-Flops and RelatedDevices 208CHAPTER 6 Digital Arithmetic: Operations and Circuits296CHAPTER 7 Counters and Registers 360CHAPTER 8 Integrated-CircuitLogic Families 488CHAPTER 9 MSI Logic Circuits 576CHAPTER 10Digital System Projects Using HDL 676CHAPTER 11 Interfacing withthe Analog World 718CHAPTER 12 Memory Devices 786CHAPTER 13Programmable Logic Device Architectures 868Glossary 898Answers toSelected Problems 911Index of ICs 919Index 922 18.xixCONTENTSCHAPTER 1 Introductory Concepts 21-1 NumericalRepresentations 41-2 Digital and Analog Systems 51-3 Digital NumberSystems 101-4 Representing Binary Quantities 131-5 DigitalCircuits/Logic Circuits 151-6 Parallel and Serial Transmission171-7 Memory 181-8 Digital Computers 19CHAPTER 2 Number Systems andCodes 242-1 Binary-to-Decimal Conversions 262-2 Decimal-to-BinaryConversions 262-3 Hexadecimal Number System 292-4 BCD Code 332-5The Gray Code 352-6 Putting It All Together 372-7 The Byte, Nibble,and Word 372-8 Alphanumeric Codes 392-9 Parity Method for ErrorDetection 412-10 Applications 44 19. xx CONTENTSChapter 3Describing Logic Circuits 543-1 Boolean Constants and Variables573-2 Truth Tables 573-3 OR Operation with OR Gates 583-4 ANDOperation with AND Gates 623-5 NOT Operation 653-6 Describing LogicCircuits Algebraically 663-7 Evaluating Logic-Circuit Outputs 683-8Implementing Circuits from BooleanExpressions 713-9 NOR Gates andNAND Gates 733-10 Boolean Theorems 763-11 DeMorgans Theorems 803-12Universality of NAND Gates and NOR Gates 833-13 AlternateLogic-Gate Representations 863-14 Which Gate Representation to Use893-15 IEEE/ANSI Standard Logic Symbols 953-16 Summary of Methodsto Describe Logic Circuits 963-17 Description Languages VersusProgrammingLanguages 983-18 Implementing Logic Circuits with PLDs1003-19 HDL Format and Syntax 1023-20 Intermediate Signals105Chapter 4 Combinational Logic Circuits 1184-1 Sum-of-ProductsForm 1204-2 Simplifying Logic Circuits 1214-3 AlgebraicSimplification 1214-4 Designing Combinational Logic Circuits 1274-5Karnaugh Map Method 1334-6 Exclusive-OR and Exclusive-NOR Circuits1444-7 Parity Generator and Checker 1494-8 Enable/Disable Circuits1514-9 Basic Characteristics of Digital ICs 1534-10 TroubleshootingDigital Systems 1604-11 Internal Digital IC Faults 1624-12 ExternalFaults 1664-13 Troubleshooting Case Study 1684-14 ProgrammableLogic Devices 1704-15 Representing Data in HDL 1774-16 Truth TablesUsing HDL 1814-17 Decision Control Structures in HDL 184 20.CONTENTS xxiChapter 5 Flip-Flops and Related Devices 2085-1 NANDGate Latch 2115-2 NOR Gate Latch 2165-3 Troubleshooting Case Study2195-4 Digital Pulses 2205-5 Clock Signals and Clocked Flip-Flops2215-6 Clocked S-R Flip-Flop 2245-7 Clocked J-K Flip-Flop 2275-8Clocked D Flip-Flop 2305-9 D Latch (Transparent Latch) 2325-10Asynchronous Inputs 2335-11 IEEE/ANSI Symbols 2365-12 Flip-FlopTiming Considerations 2385-13 Potential Timing Problem in FFCircuits 2415-14 Flip-Flop Applications 2435-15 Flip-FlopSynchronization 2435-16 Detecting an Input Sequence 2445-17 DataStorage and Transfer 2455-18 Serial Data Transfer: Shift Registers2475-19 Frequency Division and Counting 2505-20 MicrocomputerApplication 2545-21 Schmitt-Trigger Devices 2565-22 One-Shot(Monostable Multivibrator) 2565-23 Clock Generator Circuits 2605-24Troubleshooting Flip-Flop Circuits 2645-25 Sequential CircuitsUsing HDL 2685-26 Edge-Triggered Devices 2725-27 HDL Circuits withMultiple Components 277Chapter 6 Digital Arithmetic:Operations andCircuits 2966-1 Binary Addition 2986-2 Representing Signed Numbers2996-3 Addition in the 2s-Complement System 3066-4 Subtraction inthe 2s-Complement System 3076-5 Multiplication of Binary Numbers3106-6 Binary Division 3116-7 BCD Addition 3126-8 HexadecimalArithmetic 3146-9 Arithmetic Circuits 3176-10 Parallel Binary Adder3186-11 Design of a Full Adder 320 21. xxii CONTENTS6-12 CompleteParallel Adder with Registers 3236-13 Carry Propagation 3256-14Integrated-Circuit Parallel Adder 3266-15 2s-Complement System3286-16 ALU Integrated Circuits 3316-17 Troubleshooting Case Study3356-18 Using TTL Library Functions with HDL 3376-19 LogicalOperations on Bit Arrays 3386-20 HDL Adders 3406-21 Expanding theBit Capacity of a Circuit 343Chapter 7 Counters and Registers3607-1 Asynchronous (Ripple) Counters 3627-2 Propagation Delay inRipple Counters 3657-3 Synchronous (Parallel) Counters 3677-4Counters with MOD Numbers 2N 3707-5 Synchronous Down and Up/DownCounters 3777-6 Presettable Counters 3797-7 IC Synchronous Counters3807-8 Decoding a Counter 3897-9 Analyzing Synchronous Counters3937-10 Synchronous Counter Design 3967-11 Basic Counters UsingHDLs 4057-12 Full-Featured Counters in HDL 4127-13 Wiring HDLModules Together 4177-14 State Machines 4257-15 Integrated-CircuitRegisters 4377-16 Parallel In/Parallel OutThe 74ALS174/74HC1744377-17 Serial In/Serial OutThe 74ALS166/74HC166 4397-18 ParallelIn/Serial OutThe 74ALS165/74HC165 4417-19 Serial In/Parallel OutThe74ALS164/74HC164 4437-20 Shift-Register Counters 4457-21Troubleshooting 4507-22 HDL Registers 4527-23 HDL Ring Counters4597-24 HDL One-Shots 461Chapter 8 Integrated-Circuit LogicFamilies 4888-1 Digital IC Terminology 4908-2 The TTL Logic Family4988-3 TTL Data Sheets 5028-4 TTL Series Characteristics 506 22.CONTENTS xxiii8-5 TTL Loading and Fan-Out 5098-6 Other TTLCharacteristics 5148-7 MOS Technology 5188-8 Complementary MOSLogic 5218-9 CMOS Series Characteristics 5238-10 Low-VoltageTechnology 5308-11 Open-Collector/Open-Drain Outputs 5338-12Tristate (Three-State) Logic Outputs 5388-13 High-Speed BusInterface Logic 5418-14 The ECL Digital IC Family 5438-15 CMOSTransmission Gate (Bilateral Switch) 5468-16 IC Interfacing 5488-17Mixed-Voltage Interfacing 5538-18 Analog Voltage Comparators5548-19 Troubleshooting 556Chapter 9 MSI Logic Circuits 5769-1Decoders 5779-2 BCD-to-7-Segment Decoder/Drivers 5849-3Liquid-Crystal Displays 5879-4 Encoders 5919-5 Troubleshooting5979-6 Multiplexers (Data Selectors) 5999-7 MultiplexerApplications 6049-8 Demultiplexers (Data Distributors) 6109-9 MoreTroubleshooting 6179-10 Magnitude Comparator 6219-11 CodeConverters 6249-12 Data Busing 6289-13 The 74ALS173/HC173 TristateRegister 6299-14 Data Bus Operation 6329-15 Decoders Using HDL6389-16 The HDL 7-Segment Decoder/Driver 6429-17 Encoders Using HDL6459-18 HDL Multiplexers and Demultiplexers 6489-19 HDL MagnitudeComparators 6529-20 HDL Code Converters 653Chapter 10 DigitalSystem Projects Using HDL 67610-1 Small-Project Management 67810-2Stepper Motor Driver Project 67910-3 Keypad Encoder Project 687 23.xxiv CONTENTS10-4 Digital Clock Project 69310-5 Frequency CounterProject 710Chapter 11 Interfacing with the Analog World 71811-1Review of Digital Versus Analog 71911-2 Digital-to-AnalogConversion 72111-3 D/A-Converter Circuitry 72811-4 DACSpecifications 73311-5 An Integrated-Circuit DAC 73511-6 DACApplications 73611-7 Troubleshooting DACs 73811-8 Analog-to-DigitalConversion 73911-9 Digital-Ramp ADC 74011-10 Data Acquisition74511-11 Successive-Approximation ADC 74911-12 Flash ADCs 75511-13Other A/D Conversion Methods 75711-14 Sample-and-Hold Circuits76111-15 Multiplexing 76211-16 Digital Storage Oscilloscope76411-17 Digital Signal Processing (DSP) 765Chapter 12 MemoryDevices 78412-1 Memory Terminology 78612-2 General Memory Operation79012-3 CPUMemory Connections 79312-4 Read-Only Memories 79512-5ROM Architecture 79612-6 ROM Timing 79912-7 Types of ROMs 80012-8Flash Memory 80812-9 ROM Applications 81112-10 Semiconductor RAM81412-11 RAM Architecture 81512-12 Static RAM (SRAM) 81812-13Dynamic RAM (DRAM) 82312-14 Dynamic RAM Structure and Operation82412-15 DRAM Read/Write Cycles 82912-16 DRAM Refreshing 83112-17DRAM Technology 83412-18 Expanding Word Size and Capacity 83612-19Special Memory Functions 844 24. CONTENTS xxv12-20 TroubleshootingRAM Systems 84712-21 Testing ROM 852Chapter 13 Programmable LogicDeviceArchitectures 86813-1 Digital Systems Family Tree 87013-2Fundamentals of PLD Circuitry 87513-3 PLD Architectures 87713-4 TheGAL 16V8 (Generic Array Logic) 88113-5 The Altera EPM7128S CPLD88513-6 The Altera FLEX10K Family 89013-7 The Altera Cyclone Family894Glossary 898Answers to Selected Problems 911Index of ICs919Index 922 25. Digital SystemsPrinciples and Applications 26. C HA P T E R 1INTRODUCTORYCONCEPTS OUTLINE1-1 NumericalRepresentations1-2 Digital and Analog Systems1-3 Digital NumberSystems1-4 Representing BinaryQuantities1-5 DigitalCircuits/LogicCircuits1-6 Parallel and SerialTransmission1-7Memory1-8 Digital Computers 27. 3 OBJECTIVESUpon completion of thischapter, you will be able to: Distinguish between analog anddigital representations. Cite the advantages and drawbacks ofdigital techniques comparedwith analog. Understand the need foranalog-to-digital converters (ADCs) anddigital-to-analog converters(DACs). Recognize the basic characteristics of the binary numbersystem. Convert a binary number to its decimal equivalent. Count inthe binary number system. Identify typical digital signals.Identify a timing diagram. State the differences between paralleland serial transmission. Describe the property of memory. Describethe major parts of a digital computer and understandtheirfunctions. Distinguish among microcomputers, microprocessors,andmicrocontrollers. INTRODUCTIONIn todays world, the term digitalhas become part of our everyday vocabu-larybecause of the dramaticway that digital circuits and digital techniqueshave become sowidely used in almost all areas of life: computers,automa-tion,robots, medical science and technology, transportation,telecommuni-cations,entertainment, space exploration, and on andon.You are about tobegin an exciting educational journey in whichyou will discover the funda-mentalprinciples, concepts, andoperations that are common to all digitalsystems, from the simpleston/off switch to the most complex computer. Ifthis book issuccessful, you should gain a deep understanding of how alldigitalsystems work, and you should be able to apply this understandingtothe analysis and troubleshooting of any digital system.We startby introducing some underlying concepts that are a vital partofdigital technology; these concepts will be expanded on as theyareneeded later in the book.We also introduce some of theterminology that isnecessary when embarking on a new field ofstudy, and add to this list ofimportant terms in every chapter. 28.4 CHAPTER 1/INTRODUCTORY CONCEPTS1-1 NUMERICAL REPRESENTATIONSInscience, technology, business, and, in fact, most other fields ofendeavor,we are constantly dealing with quantities. Quantities aremeasured, moni-tored,recorded, manipulated arithmetically,observed, or in some other wayutilized in most physical systems. Itis important when dealing with variousquantities that we be able torepresent their values efficiently and accu-rately.There arebasically two ways of representing the numerical valueofquantities: analog and digital.Analog RepresentationsIn analogrepresentation a quantity is represented by a continuouslyvari-able,proportional indicator. An example is an automobilespeedometer fromthe classic muscle cars of the 1960s and 1970s. Thedeflection of the needleis proportional to the speed of the car andfollows any changes that occur asthe vehicle speeds up or slowsdown. On older cars, a flexible mechanicalshaft connected thetransmission to the speedometer on the dash board. It isinterestingto note that on newer cars, the analog representation isusuallypreferred even though speed is now measureddigitally.Thermometers before the digital revolution used analogrepresentation tomeasure temperature, and many are still in usetoday. Mercury thermometersuse a column of mercury whose height isproportional to temperature. Thesedevices are being phased out ofthe market because of environmental con-cerns,but nonetheless theyare an excellent example of analog representa-tion.Another exampleis an outdoor thermometer on which the position of thepointerrotates around a dial as a metal coil expands and contracts withtem-peraturechanges. The position of the pointer is proportional tothe tempera-ture.Regardless of how small the change in temperature,there will be aproportional change in the indication.In these twoexamples the physical quantities (speed and temperature) arebeingcoupled to an indicator by purely mechanical means. In electricalanalogsystems, the physical quantity that is being measured orprocessed is convertedto a proportional voltage or current(electrical signal). This voltage or currentis then used by thesystem for display, processing, or control purposes.Sound is anexample of a physical quantity that can be represented byanelectrical analog signal. A microphone is a device that generatesan outputvoltage that is proportional to the amplitude of the soundwaves that strikeit.Variations in the sound waves will producevariations in the microphonesoutput voltage.Tape recordings canthen store sound waves by using the out-putvoltage of themicrophone to proportionally change the magnetic field onthetape.Analog quantities such as those cited above have an importantcharac-teristic,no matter how they are represented: they can varyover a continuousrange of values. The automobile speed can have anyvalue between zero and,say, 100 mph. Similarly, the microphoneoutput might have any value withina range of zero to 10 mV (e.g., 1mV, 2.3724 mV, 9.9999 mV).Digital RepresentationsIn digitalrepresentation the quantities are represented not bycontinuouslyvariable indicators but by symbols called digits. As anexample, consider thedigital clock, which provides the time of dayin the form of decimal digits thatrepresent hours and minutes (andsometimes seconds). As we know, the timeof day changescontinuously, but the digital clock reading does notchangecontinuously; rather, it changes in steps of one per minute(or per second). In 29. SECTION 1-2/DIGITAL AND ANALOG SYSTEMS5other words, this digital representation of the time of daychanges in discretesteps, as compared with the representation oftime provided by an analog acline-powered wall clock, where thedial reading changes continuously.The major difference betweenanalog and digital quantities, then, can besimply stated asfollows:Kanalog continuousdigital discrete (step by step)KBecauseof the discrete nature of digital representations, there is noambiguitywhen reading the value of a digital quantity, whereas thevalue of an analogquantity is often open to interpretation. Inpractice, when we take a measure-mentof an analog quantity, wealways round to a convenient level of preci-sion.In other words, wedigitize the quantity.The digital representation is theresult ofassigning a number of limited precision to a continuouslyvariablequantity. For example, when you take your temperature witha mercury (ana-log)thermometer, the mercury column is usuallybetween two graduation lines,but you would pick the nearest lineand assign it a number of, say, 98.6F.EXAMPLE 1-1 Which of thefollowing involve analog quantities and which involvedigitalquantities?(a) Ten-position switch(b) Current flowing froman electrical outlet(c) Temperature of a room(d) Sand grains on thebeach(e) Automobile fuel gaugeSolution(a) Digital(b) Analog(c)Analog(d) Digital, since the number of grains can be only certaindiscrete (integer)values and not every possible value over acontinuous range(e) Analog, if needle type; digital, if numericalreadout or bar graph displayREVIEW QUESTION * 1. Concisely describethe major difference between analog and digitalquantities.1-2DIGITAL AND ANALOG SYSTEMSA digital system is a combination ofdevices designed to manipulate logicalinformation or physicalquantities that are represented in digital form; thatis, thequantities can take on only discrete values. These devices aremost*Answers to review questions are found at the end of thechapter in which they occur. 30. 6 CHAPTER 1/INTRODUCTORYCONCEPTSoften electronic, but they can also be mechanical,magnetic, or pneumatic.Some of the more familiar digital systemsinclude digital computers and cal-culators,digital audio and videoequipment, and the telephone systemtheworlds largest digitalsystem.An analog system contains devices that manipulate physicalquantitiesthat are represented in analog form. In an analog system,the quantities canvary over a continuous range of values. Forexample, the amplitude of theoutput signal to the speaker in aradio receiver can have any value betweenzero and its maximumlimit. Other common analog systems are audio ampli-fiers,magnetictape recording and playback equipment, and a simple lightdimmerswitch.Advantages of Digital TechniquesAn increasing majority ofapplications in electronics, as well as in most othertechnologies,use digital techniques to perform operations that wereonceperformed using analog methods. The chief reasons for the shiftto digitaltechnology are:1. Digital systems are generally easier todesign. The circuits used in digitalsystems are switching circuits,where exact values of voltage or currentare not important, only therange (HIGH or LOW) in which they fall.2. Information storage iseasy. This is accomplished by special devices andcircuits that canlatch onto digital information and hold it for as long asnecessary,and mass storage techniques that can store billions of bitsofinformation in a relatively small physical space. Analog storagecapabil-itiesare, by contrast, extremely limited.3. Accuracy andprecision are easier to maintain throughout the system. Onceasignal is digitized, the information it contains does notdeteriorate as itis processed. In analog systems, the voltage andcurrent signals tend tobe distorted by the effects of temperature,humidity, and component tol-erancevariations in the circuits thatprocess the signal.4. Operation can be programmed. It is fairlyeasy to design digital systemswhose operation is controlled by aset of stored instructions called aprogram. Analog systems can alsobe programmed, but the variety andthe complexity of the availableoperations are severely limited.5. Digital circuits are lessaffected by noise. Spurious fluctuations in voltage(noise) are notas critical in digital systems because the exact value of avoltageis not important, as long as the noise is not large enough topre-ventus from distinguishing a HIGH from a LOW.6. More digitalcircuitry can be fabricated on IC chips. It is true thatanalogcircuitry has also benefited from the tremendous developmentof ICtechnology, but its relative complexity and its use of devicesthat cannotbe economically integrated (high-value capacitors,precision resistors,inductors, transformers) have prevented analogsystems from achievingthe same high degree ofintegration.Limitations of Digital TechniquesThere are really veryfew drawbacks when using digital techniques. The twobiggestproblems are:The real world is analog.Processing digitized signalstakes time. 31. SECTION 1-2/DIGITAL AND ANALOG SYSTEMS 7Mostphysical quantities are analog in nature, and these quantities areoftenthe inputs and outputs that are being monitored, operated on,and controlledby a system. Some examples are temperature, pressure,position, velocity, liq-uidlevel, flow rate, and so on.We are inthe habit of expressing these quan-titiesdigitally, such as when wesay that the temperature is ( whenwe want to be more precise), butwe are really making a digital approxima-tionto an inherentlyanalog quantity.To take advantage of digital techniques whendealing with analog inputsand outputs, four steps must befollowed:1. Convert the physical variable to an electrical signal(analog).2. Convert the electrical (analog) signal into digitalform.3. Process (operate on) the digital information.4. Convert thedigital outputs back to real-world analog form.An entire book couldbe written about step 1 alone.There are many kindsof devices thatconvert various physical variables into electrical analogsig-nals(sensors).These are used to measure things that are foundin our realanalog world. On your car alone, there are sensors forfluid level (gas tank),temperature (climate control and engine),velocity (speedometer), accelera-tion(airbag collision detection),pressure (oil, manifold), and flow rate (fuel),to name just afew.To illustrate a typical system that uses this approach Figure1-1 describesa precision temperature regulation system. A userpushes up or down buttonsto set the desired temperature in0.1increments (digital representation). Atemperature sensor in theheated space converts the measured temperatureto a proportionalvoltage. This analog voltage is converted to a digital quan-titybyan analog-to-digital converter (ADC). This value is then comparedtothe desired value and used to determine a digital value of howmuch heat isneeded. The digital value is converted to an analogquantity (voltage) by adigital-to-analog converter (DAC). Thisvoltage is applied to a heating ele-ment,which will produce heatthat is related to the voltage applied and willaffect thetemperature of the space.64 63.8FIGURE 1-1 Block diagram of aprecision digital temperature control system.TemperaturecontrolledspaceDigital input:Set Desired TemperatureDigitalProcessorDigitalAnalogconversionAnalogDigitalconversionHeatSensorAnalogsignal representingactual temperatureDigital signalrepresentingactual temperatureDigital signal representingpower(voltage) to heater+Another good example where conversion betweenanalog and digitaltakes place is in the recording of audio. Compactdisks (CDs) have replacedcassette tapes because they provide a muchbetter means for recording and 32. 8 CHAPTER 1/INTRODUCTORYCONCEPTSplaying back music. The process works something like this:(1) sounds frominstruments and human voices produce an analogvoltage signal in a micro-phone;(2) this analog signal is convertedto a digital format using an analog-to-digital conversion process;(3) the digital information is stored on the CDssurface; (4) duringplayback, the CD player takes the digital informationfrom the CDsurface and converts it into an analog signal that is thenampli-fiedand fed to a speaker, where it can be picked up by thehuman ear.The second drawback to digital systems is that processingthese digitizedsignals (lists of numbers) takes time. And we alsoneed to convert betweenthe analog and digital forms of information,which can add complexity andexpense to a system.The more precisethe numbers need to be, the longer ittakes to process them. In manyapplications, these factors are outweighed bythe numerousadvantages of using digital techniques, and so theconversionbetween analog and digital quantities has become quitecommonplace in thecurrent technology.There are situations, however,where use of analog techniques is simpleror more economical. Forexample, several years ago, a colleague (TomRobertson) decided tocreate a control system demonstration for tourgroups. He planned tosuspend a metallic object in a magnetic field, as shownin Figure1-2. An electromagnet was made by winding a coil of wire andcon-trollingthe amount of current through the coil.The position ofthe metal ob-jectwas measured by passing an infrared light beamacross the magneticfield. As the object drew closer to the magneticcoil, it began to block thelight beam. By measuring small changesin the light level, the magnetic fieldcould be controlled to keepthe metal object hovering and stationary, with nostrings attached.All attempts at using a microcomputer to measure thesevery smallchanges, run the control calculations, and drive the magnetprovedto be too slow, even when using the fastest, most powerful PCavail-ableat the time. His final solution used just a couple ofop-amps and a fewdollars worth of other components: a totallyanalog approach.Today we haveaccess to processors fast enough andmeasurement techniques preciseenough to accomplish this feat, butthe simplest solution is still analog.(a) (b)FIGURE 1-2 A magneticlevitation system suspending: (a) a globe with a steelplateinserted and (b) a hammer.It is common to see both digital andanalog techniques employed withinthe same system to be able toprofit from the advantages of each. In thesehybrid systems, one ofthe most important parts of the design phase involves 33. SECTION1-2/DIGITAL AND ANALOG SYSTEMS 9determining what parts of thesystem are to be analog and what parts are tobe digital. The trendin most systems is to digitize the signal as early as pos-sibleandconvert it back to analog as late as possible as the signalsflowthrough the system.The Future Is DigitalThe advances in digitaltechnology over the past three decades have beennothing short ofphenomenal, and there is every reason to believe that moreiscoming.Think of the everyday items that have changed from analogformatto digital in your lifetime. An indoor/outdoor wirelessdigital thermometercan be purchased for less then $10.00. Cars havegone from having very fewelectronic controls to being predominantlydigitally controlled vehicles.Digital audio has moved us to thecompact disk and MP3 player. Digitalvideo brought the DVD. Digitalhome video and still cameras; digital record-ingwith systems likeTiVo; digital cellular phones; and digital imaging inx-ray,magnetic resonance imaging (MRI), and ultrasound systems inhospitalsare just a few of the applications that have been takenover by the digitalrevolution. As soon as the infrastructure is inplace, telephone and televisionsystems will go digital. The growthrate in the digital realm continues to bestaggering. Maybe yourautomobile is equipped with a system such as GMsOn Star, whichturns your dashboard into a hub for wirelesscommunication,information, and navigation. You may already be usingvoice commands tosend or retrieve e-mail, call for a trafficreport, check on the cars mainte-nanceneeds, or just switch radiostations or CDsall without taking yourhands off the wheel or youreyes off the road. Cars can report their exact lo-cationin case ofemergency or mechanical breakdown. In the coming yearswirelesscommunication will continue to expand coverage to providecon-nectivitywherever you are. Telephones will be able to receive,sort, andmaybe respond to incoming calls like a well-trainedsecretary.The digital tel-evisionrevolution will provide not onlyhigher definition of the picture, butalso much more flexibility inprogramming.You will be able to select the pro-gramsthat you wantto view and load them into your televisions memory, al-lowingyou topause or replay scenes at your convenience, very much likeviewing aDVD today. As virtual reality continues to improve, you will beableto interact with the subject matter you are studying.This may notsoundexciting when studying electronics, but imagine studyinghistory from thestandpoint of being a participant, or learningproper techniques for every-thingfrom athletics to surgery throughsimulations based on your actualperformance.Digital technology willcontinue its high-speed incursion into current ar-easof our livesas well as break new ground in ways we may never havecon-sidered.These applications (and many more) are based on theprinciplespresented in this text.The software tools to developcomplex systems are con-stantlybeing upgraded and are available toanyone over the Web. We willstudy the technical underpinningsnecessary to communicate with any ofthese tools, and prepare youfor a fascinating and rewarding career.REVIEW QUESTIONS 1. What arethe advantages of digital techniques over analog?2. What is thechief limitation to the use of digital techniques? 34. 1-3 DIGITALNUMBER SYSTEMSMany number systems are in use in digitaltechnology.The most common arethe decimal, binary, octal, andhexadecimal systems. The decimal system isclearly the most familiarto us because it is a tool that we use every day.Examining some ofits characteristics will help us to understand the othersystemsbetter.Decimal SystemThe decimal system is composed of 10 numeralsor symbols.These 10 symbolsare 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; usingthese symbols as digits of a number,we can ex-pressany quantity.Thedecimal system, also called the base-10 system becauseit has 10digits, has evolved naturally as a result of the fact that peoplehave 10fingers. In fact, the word digit is derived from the Latinword for finger.The decimal system is a positional-value system inwhich the value of adigit depends on its position. For example,consider the decimal number 453.We know that the digit 4 actuallyrepresents 4 hundreds, the 5 represents 5tens, and the 3 represents3 units. In essence, the 4 carries the most weight ofthe threedigits; it is referred to as the most significant digit (MSD).The 3car-riesthe least weight and is called the least significant digit(LSD).Consider another example, 27.35.This number is actually equalto 2 tensplus 7 units plus 3 tenths plus 5 hundredths, or 2107130.150.01. The decimal point is used to separate the integer andfractionalparts of the number.More rigorously, the variouspositions relative to the decimal point carryweights that can beexpressed as powers of 10.This is illustrated in Figure 1-3,wherethe number 2745.214 is represented. The decimal point separatesthepositive powers of 10 from the negative powers.The number2745.214 is thusequal to(2 * 10+3) + (7 * 10+2) + (4 * 101) + (5 *100)+ (2 * 10-1) + (1 * 10-2) + (4 * 10-3)10 CHAPTER 1/INTRODUCTORYCONCEPTSPositional values103 102101 100 101102 1032 7 4 5 . 2 14(weights)DecimalpointMSD LSDFIGURE 1-3 Decimalposition values aspowersof 10.In general, any number is simply the sum of theproducts of each digit valueand its positional value.DecimalCountingWhen counting in the decimal system, we start with 0 in theunits positionand take each symbol (digit) in progression until wereach 9. Then we add a1 to the next higher position and start overwith 0 in the first position (see 35. SECTION 1-3/DIGITAL NUMBERSYSTEMS 11Figure 1-4). This process continues until the count of 99is reached. Then weadd a 1 to the third position and start overwith 0s in the first two positions.The same pattern is followedcontinuously as high as we wish to count.It is important to notethat in decimal counting, the units position (LSD)changes upwardwith each step in the count, the tens position changes up-wardevery10 steps in the count, the hundreds position changes upwardevery100 steps in the count, and so on.Another characteristic of thedecimal system is that using only two deci-malplaces,we can countthrough different numbers (0 to 99).* With102 = 100three places wecan count through 1000 numbers (0 to 999), and so on. Ingen-eral,with N places or digits,we can count through 10N differentnumbers, start-ingwith and including zero.The largest number willalways be10N - 1.Binary SystemUnfortunately, the decimal numbersystem does not lend itself to convenientimplementation in digitalsystems. For example, it is very difficult to designelectronicequipment so that it can work with 10 different voltage levels(eachone representing one decimal character, 0 through 9). On theotherhand, it is very easy to design simple, accurate electroniccircuits that oper-atewith only two voltage levels. For thisreason, almost every digital systemuses the binary (base-2) numbersystem as the basic number system of itsoperations. Other numbersystems are often used to interpret or representbinary quantitiesfor the convenience of the people who work with and usethesedigital systems.In the binary system there are only two symbols orpossible digit values, 0and 1. Even so, this base-2 system can beused to represent any quantity thatcan be represented in decimal orother number systems. In general though, itwill take a greaternumber of binary digits to express a given quantity.All of thestatements made earlier concerning the decimal system areequallyapplicable to the binary system.The binary system is also apositional-valuesystem, wherein each binary digit has its own valueor weight expressedas a power of 2. This is illustrated in Figure1-5. Here, places to the left of the*Zero is counted as anumber.0123456789101112131415161718192021222324252627282930991001011021031992009991000FIGURE1-4 Decimalcounting. 36. 12 CHAPTER 1/INTRODUCTORY CONCEPTS23 222120 21 22 231 0 1 1 1 0 1PositionalvaluesBinarypointMSB LSBFIGURE1-5 Binary positionvalues as powers of 2.binary point (counterpartof the decimal point) are positive powers of 2, andplaces to theright are negative powers of 2.The number 1011.101 is shownrep-resentedin the figure. To find its equivalent in the decimalsystem, we simplytake the sum of the products of each digit value(0 or 1) and its positional value:1011.1012 = (1 * 23) + (0 * 22) +(1 * 21) + (1 * 20)+ (1 * 2-1) + (0 * 2-2) + (1 * 2-3)= 8 + 0 + 2 +1 + 0.5 + 0 + 0.125= 11.62510Notice in the preceding operation thatsubscripts (2 and 10) were used to in-dicatethe base in which theparticular number is expressed.This conventionis used to avoidconfusion whenever more than one number system is beingemployed.Inthe binary system, the term binary digit is often abbreviated totheterm bit, which we will use from now on. Thus, in the numberexpressed inFigure 1-5 there are four bits to the left of thebinary point, representing theinteger part of the number, and threebits to the right of the binary point, rep-resentingthe fractionalpart. The most significant bit (MSB) is the leftmostbit (largestweight).The least significant bit (LSB) is the rightmost bit(small-estweight).These are indicated in Figure 1-5. Here, the MSBhas a weight of23; the LSB has a weight of2-3.Binary CountingWhenwe deal with binary numbers, we will usually be restricted to aspe-cificnumber of bits. This restriction is based on the circuitryused to repre-sentthese binary numbers. Lets use four-bit binarynumbers to illustrate themethod for counting in binary.The sequence(shown in Figure 1-6) begins with all bits at 0; this is calledthezero count. For each successive count, the units (20) positiontoggles; thatis, it changes from one binary value to the other.Each time the units bitchanges from a 1 to a 0, the twos (21)position will toggle (change states). Eachtime the twos positionchanges from 1 to 0, the fours (22) position will toggle(changestates). Likewise, each time the fours position goes from 1 to 0,theeights (23) position toggles. This same process would becontinued for thehigher-order bit positions if the binary numberhad more than four bits.The binary counting sequence has animportant characteristic, as shown inFigure 1-6. The units bit(LSB) changes either from 0 to 1 or 1 to 0 with eachcount.Thesecond bit (twos position) stays at 0 for two counts, then at 1 fortwocounts, then at 0 for two counts, and so on.The third bit (foursposition) staysat 0 for four counts, then at 1 for four counts, andso on.The fourth bit (eightsposition) stays at 0 for eight counts,then at 1 for eight counts. If we wanted to 37. SECTION1-4/REPRESENTING BINARY QUANTITIES 13Weights 23 = 8 22 = 4 21 = 220 = 1 Decimalequivalent01234567891011121314150000000011111111000011110000111100110011001100110101010101010101LSBFIGURE1-6 Binarycounting sequence.count further,we would add more places,and this pattern would continue with0s and 1s alternating in groupsof 2N-1.For example, using a fifth binary place,the fifth bit wouldalternate sixteen 0s, then sixteen 1s, and so on.As we saw for thedecimal system, it is also true for the binary system thatby usingN bits or places, we can go through 2N counts. For example, withtwobits we can go through counts (002 through 112); with four bitswe cango through counts (00002 through 11112); and so on. The lastcountwill always be all 1s and is equal to in the decimal system.For exam-ple,2N-124 = 1622 = 4using four bits, the last count is11112 = 24-1 = 1510.EXAMPLE 1-2 What is the largest number that canbe represented using eight bits?Solution2N-1 = 28-1 = 25510 =111111112.This has been a brief introduction of the binary numbersystem and itsrelation to the decimal system.We will spend muchmore time on these twosystems and several others in the nextchapter.REVIEW QUESTIONS 1. What is the decimal equivalent of11010112?2. What is the next binary number following 101112 in thecounting sequence?3. What is the largest decimal value that can berepresented using 12 bits?1-4 REPRESENTING BINARY QUANTITIESIndigital systems, the information being processed is usually presentin bi-naryform. Binary quantities can be represented by any devicethat has onlytwo operating states or possible conditions. Forexample, a switch has onlytwo states: open or closed. We canarbitrarily let an open switch represent 38. 14 CHAPTER1/INTRODUCTORY CONCEPTSbinary 0 and a closed switch representbinary 1.With this assignment we cannow represent any binarynumber. Figure 1-7(a) shows a binary code numberfor a garage dooropener.The small switches are set to form the binarynum-ber1000101010. The door will open only if a matching pattern ofbits is setin the receiver and the transmitter.FIGURE 1-7 (a)Binarycode settings for a garagedoor opener. (b) Digitalaudio on aCD.(a)(b)Another example is shown in Figure 1-7(b), where binarynumbers arestored on a CD. The inner surface (under a transparentplastic layer) iscoated with a highly reflective aluminum layer.Holes are burned throughthis reflective coating to form pits thatdo not reflect light the same as theunburned areas.The areas wherethe pits are burned are considered 1 andthe reflective areas are0.There are numerous other devices that have only two operatingstates orcan be operated in two extreme conditions. Among theseare: light bulb(bright or dark), diode (conducting ornonconducting), electromagnet (ener-gizedor deenergized),transistor (cut off or saturated), photocell (illumi-natedor dark),thermostat (open or closed), mechanical clutch (engagedordisengaged), and spot on a magnetic disk (magnetized ordemagnetized).In electronic digital systems, binary information isrepresented by voltages(or currents) that are present at the inputsand outputs of the various circuits.Typically, the binary 0 and 1are represented by two nominal voltage levels.Forexample, zerovolts (0 V) might represent binary 0, and 5 V might representbinary1. In actuality, because of circuit variations, the 0 and 1 wouldbe rep-resentedby voltage ranges.This is illustrated in Figure1-8(a), where any volt-agebetween 0 and 0.8 V represents a 0 andany voltage between 2 and 5 Vrepresents a 1. All input and outputsignals will normally fall within one ofthese ranges, except duringtransitions from one level to another.We can now see anothersignificant difference between digital and ana-logsystems. Indigital systems, the exact value of a voltage is not important; 39.SECTION 1-5/DIGITAL CIRCUITS/LOGIC CIRCUITS 15Notused(a)5 V2 V0.8V0 V0(b)Volts4 V1010 V tBinary 1Binary 0t0 t1 t2 t3 t4t5InvalidvoltagesFIGURE 1-8 (a) Typical voltage assignments indigital system; (b) typical digitalsignal timing diagram.forexample, for the voltage assignments of Figure 1-8(a), a voltage of3.6 Vmeans the same as a voltage of 4.3 V. In analog systems, theexact value of avoltage is important. For instance, if the analogvoltage is proportional to thetemperature measured by a transducer,the 3.6 V would represent a differenttemperature than would 4.3 V.In other words, the voltage value carries sig-nificantinformation.This characteristic means that the design of accurateanalogcircuitry is generally more difficult than that of digitalcircuitry be-causeof the way in which exact voltage values areaffected by variations incomponent values, temperature, and noise(random voltage fluctuations).Digital Signals and TimingDiagramsFigure 1-8(b) shows a typical digital signal and how itvaries over time. It isactually a graph of voltage versus time (t)and is called a timing diagram.Thehorizontal time scale is markedoff at regular intervals beginning at t0 andproceeding to t1, t2,and so on. For the example timing diagram shown here,the signalstarts at 0 V (a binary 0) at time t0 and remains there until timet1.At t1, the signal makes a rapid transition (jump) up to 4 V (abinary 1). At t2,it jumps back down to 0 V. Similar transitionsoccur at t3 and t5. Note that thesignal does not change at t4 butstays at 4 V from t3 to t5.The transitions on this timing diagramare drawn as vertical lines, and sothey appear to be instantaneous,when in reality they are not. In many situ-ations,however, thetransition times are so short compared to the timesbe-tweentransitions that we can show them on the diagram asvertical lines.Wewill encounter situations later where it will benecessary to show the transi-tionsmore accurately on an expandedtime scale.Timing diagrams are used extensively to show how digitalsignals changewith time, and especially to show the relationshipbetween two or more dig-italsignals in the same circuit or system.By displaying one or more digitalsignals on an oscilloscope orlogic analyzer, we can compare the signals to theirexpected timingdiagrams. This is a very important part of the testingandtroubleshooting procedures used in digital systems.1-5 DIGITALCIRCUITS/LOGIC CIRCUITSDigital circuits are designed to produceoutput voltages that fall within theprescribed 0 and 1 voltageranges such as those defined in Figure 1-8.Likewise, digitalcircuits are designed to respond predictably to input volt-agesthatare within the defined 0 and 1 ranges. What this means is that a40. 16 CHAPTER 1/INTRODUCTORY CONCEPTSdigital circuit will respondin the same way to all input voltages that fallwithin the allowed 0range; similarly, it will not distinguish between inputvoltagesthat lie within the allowed 1 range.To illustrate, Figure 1-9represents a typical digital circuit with input viand output vo.The output is shown for two different input signal waveforms.Notethat vo is the same for both cases because the two inputwaveforms,while differing in their exact voltage levels, are at thesame binary levels.Digitalcircuitvivo0 V4 V0.5 V5 V0 Vt3.7 VtCaseICase II4 Vvi vovivo0 VFIGURE 1-9 A digitalcircuit responds toaninputs binary level (0 or 1)and not to its actualvoltage.LogicCircuitsThe manner in which a digital circuit responds to an inputis referred to asthe circuits logic. Each type of digital circuitobeys a certain set of logicrules. For this reason, digitalcircuits are also called logic circuits. We willuse both termsinterchangeably throughout the text. In Chapter 3, we willsee moreclearly what is meant by a circuits logic.We will be studying allthe types of logic circuits that are currently usedin digitalsystems. Initially, our attention will be focused only on thelogicaloperation that these circuits performthat is, therelationship between thecircuit inputs and outputs.We will deferany discussion of the internal cir-cuitoperation of these logiccircuits until after we have developed an un-derstandingof theirlogical operation.Digital Integrated CircuitsAlmost all of thedigital circuits used in modern digital systems areinte-gratedcircuits (ICs).The wide variety of available logic ICshas made it pos-sibleto construct complex digital systems that aresmaller and more reliablethan their discrete-componentcounterparts.Several integrated-circuit fabrication technologiesare used to produce dig-italICs, the most common being CMOS, TTL,NMOS, and ECL. Each differs inthe type of circuitry used to providethe desired logic operation. For example,TTL (transistor-transistorlogic) uses the bipolar transistor as its main circuitel-ement,while CMOS (complementary metal-oxide-semiconductor) usesthe en-hancement-mode MOSFET as its principal circuit element.Wewill learn aboutthe various IC technologies, their characteristics,and their relative advantagesand disadvantages after we master thebasic logic circuit types. 41. SECTION 1-6/PARALLEL AND SERIALTRANSMISSION 17REVIEW QUESTIONS 1. True or false:The exact value ofan input voltage is critical for a digital circuit.2. Can a digitalcircuit produce the same output voltage for different inputvoltagevalues?3. A digital circuit is also referred to as a ________circuit.4. A graph that shows how one or more digital signalschange with time iscalled a ________.1-6 PARALLEL AND SERIALTRANSMISSIONOne of the most common operations that occur in anydigital system is thetransmission of information from one place toanother. The information canbe transmitted over a distance as smallas a fraction of an inch on the samecircuit board, or over adistance of many miles when an operator at a com-puterterminal iscommunicating with a computer in another city. The infor-mationthatis transmitted is in binary form and is generally representedasvoltages at the outputs of a sending circuit that are connectedto the inputsof a receiving circuit. Figure 1-10 illustrates thetwo basic methods for digi-talinformation transmission: paralleland serial.HMSBLSB01001000i01101001H00010010i10010110(a)LSB MSB LSBMSBFIGURE 1-10 (a) Paralleltransmission uses one con-nectinglineper bit, and allbits are transmitted simul-taneously;(b) serialtrans-missionuses only one sig-nalline, and the individualbits aretransmitted serially(one at a time).(b)Figure 1-10(a) demonstratesparallel transmission of data from a com-puterto a printer usingthe parallel printer port (LPT1) of the computer. Inthis scenario,assume we are trying to print the word Hi on the printer.The 42. 18CHAPTER 1/INTRODUCTORY CONCEPTSbinary code for H is 01001000 andthe binary code for i is 01101001. Eachcharacter (the H and the i)are made up of eight bits. Using paralleltransmission, all eightbits are sent simultaneously over eight wires.The His sent first,followed by the i.Figure 1-10(b) demonstrates serial transmissionsuch as is employedwhen using a serial COM port on your computer tosend data to a modem, orwhen using a USB (Universal Serial Bus)port to send data to a printer. Al-thoughthe details of the dataformat and speed of transmission are quite dif-ferentbetween a COMport and a USB port, the actual data are sent in thesame way: onebit at a time over a single wire.The bits are shown in thedia-gramas though they were actually moving down the wire in theorder shown.The least significant bit of H is sent first and themost significant bit of iis sent last. Of course, in reality, onlyone bit can be on the wire at any point intime and time is usuallydrawn on a graph starting at the left and advancingto theright.This produces a graph of logic bits versus time of the serialtrans-missioncalled a timing diagram. Notice that in thispresentation, the leastsignificant bit is shown on the left becauseit was sent first.The principal trade-off between parallel andserial representations is oneof speed versus circuit simplicity.The transmission of binary data from onepart of a digital system toanother can be done more quickly using parallelrepresentationbecause all the bits are transmitted simultaneously, whilese-rialrepresentation transmits one bit at a time. On the otherhand, parallel re-quiresmore signal lines connected between thesender and the receiver ofthe binary data than does serial. Inother words, parallel is faster, and serialrequires fewer signallines. This comparison between parallel and serialmethods forrepresenting binary information will be encountered manytimes indiscussions throughout the text.REVIEW QUESTION 1. Describe therelative advantages of parallel and serial transmission ofbinarydata.1-7 MEMORYWhen an input signal is applied to most devices orcircuits, the output some-howchanges in response to the input, andwhen the input signal is removed,the output returns to its originalstate.These circuits do not exhibit the prop-ertyof memory becausetheir outputs revert back to normal. In digitalcircuitry certaintypes of devices and circuits do have memory.When an inputisapplied to such a circuit, the output will change its state, but itwill remainin the new state even after the input is removed.Thisproperty of retaining itsresponse to a momentary input is calledmemory. Figure 1-11 illustratesnon-memoryNonmemorycircuitMemorycircuitand memory operations.FIGURE1-11 Comparisonof nonmemory and memoryoperation. 43. SECTION1-8/DIGITAL COMPUTERS 19Memory devices and circuits play animportant role in digital systems be-causethey provide a means forstoring binary numbers either temporarily orpermanently, with theability to change the stored information at any time. Aswe shallsee, the various memory elements include magnetic and opticaltypesand those that utilize electronic latching circuits (calledlatches and flip-flops).1-8 DIGITAL COMPUTERSDigital techniqueshave found their way into innumerable areas of technol-ogy,but thearea of automatic digital computers is by far the most notableandmost extensive. Although digital computers affect some part of allof ourlives, it is doubtful that many of us know exactly what acomputer does. Insimplest terms, a computer is a system of hardwarethat performs arithmeticoperations, manipulates data (usually inbinary form), and makes decisions.For the most part, human beingscan do whatever computers can do, butcomputers can do it with muchgreater speed and accuracy, in spite of the factthat computersperform all their calculations and operations one step at atime.For example, a human being can take a list of 10 numbers and findtheirsum all in one operation by listing the numbers one over theother and addingthem column by column. A computer, on the otherhand, can add numbersonly two at a time, so that adding this samelist of numbers will take nine ac-tualaddition steps. Of course,the fact that the computer requires only a fewnanoseconds per stepmakes up for this apparent inefficiency.A computer is faster andmore accurate than people are, but unlike mostof us, it must begiven a complete set of instructions that tell it exactly whatto doat each step of its operation.This set of instructions, called aprogram,is prepared by one or more persons for each job thecomputer is to do. Pro-gramsare placed in the computers memory unitin binary-coded form, witheach instruction having a unique code.Thecomputer takes these instructioncodes from memory one at a time andperforms the operation called for bythe code.Major Parts of aComputerThere are several types of computer systems, but each canbe broken downinto the same functional units. Each unit performsspecific functions, and allunits function together to carry out theinstructions given in the program.Figure 1-12 shows the five majorfunctional parts of a digital computerandData,informationArithmetic/logicInputControlOutputMemoryData,informationCentral ProcessingUnit (CPU)ControlsignalsData or informationFIGURE 1-12 Functional diagram of adigital computer. 44. 20 CHAPTER 1/INTRODUCTORY CONCEPTStheirinteraction. The solid lines with arrows represent the flow ofdataand information. The dashed lines with arrows represent theflow of timingand control signals.The major functions of each unitare:1. Input unit. Through this unit, a complete set ofinstructions and data isfed into the computer system and into thememory unit, to be stored un-tilneeded. The information typicallyenters the input unit from a key-boardor a disk.2. Memory unit. Thememory stores the instructions and data received fromthe inputunit. It stores the results of arithmetic operations receivedfromthe arithmetic unit. It also supplies information to the outputunit.3. Control unit. This unit takes instructions from the memoryunit one at atime and interprets them. It then sends appropriatesignals to all theother units to cause the specific instruction tobe executed.4. Arithmetic/logic unit. All arithmetic calculationsand logical decisionsare performed in this unit, which can thensend results to the memoryunit to be stored.5. Output unit. Thisunit takes data from the memory unit and prints out,displays, orotherwise presents the information to the operator (orprocess, inthe case of a process control computer).Central Processing Unit(CPU)As the diagram in Figure 1-12 shows, the control andarithmetic/logic unitsare often considered as one unit, called thecentral processing unit (CPU).The CPU contains all of the circuitryfor fetching and interpreting instruc-tionsand for controlling andperforming the various operations called for bytheinstructions.TYPES OF COMPUTERS All computers are made up of thebasic units de-scribedabove, but they can differ as to physicalsize, operating speed, mem-orycapacity, and computational power, aswell as other characteristics.Computer systems are configured inmany and various ways today, with manycommon characteristics anddistinguishing differences. Large computer sys-temsthat arepermanently installed in multiple cabinets are used bycorpo-rationsand universities for information technology support.Desktoppersonal computers are used in our homes and offices to runuseful applica-tionprograms that enhance our lives and providecommunication with othercomputers. Portable computers are found inPDAs and specialized comput-ersare found in video game systems. Themost prevalent form of computerscan be found performing dedicatedroutine tasks in appliances and systemsall around us.Today, all butthe largest of these systems utilize technology that hasevolvedfrom the invention of the microprocessor. The microprocessor ises-sentiallya central processing unit (CPU) in an integratedcircuit that can beconnected to the other blocks of a computersystem. Computers that use amicroprocessor as their CPU are usuallyreferred to as microcomputers. Thegeneral-purpose microcomputers(e.g., PCs, PDAs, etc.) perform a variety oftasks in a wide rangeof applications depending on the software (programs)they arerunning. Contrast these with the dedicated computers that aredo-ingthings such as operating your cars engine, controlling yourcars antilockbraking system, or running your microwave oven. Thesecomputers cannotbe programmed by the user, but simply perform theirintended control 45. IMPORTANT TERMS 21task: they are referred toas microcontrollers. Since these microcontrollersare an integralpart of a bigger system and serve a dedicated purpose, theyalso arecalled embedded controllers. Microcontrollers generally have alltheelements of a complete computer (CPU, memory, and input/outputports), allcontained on a single integrated circuit.You can findthem embedded in yourkitchen appliances, entertainment equipment,photocopiers, automaticteller machines, automated manufacturingequipment, medical instrumen-tation,and much, much more.So you see,even people who dont own a PC or use one at work or schoolare usingmicrocomputers every day because so many modern consumerelectronicdevices, appliances, office equipment, and much more arebuiltaround embedded microcontrollers. If you work, play, or go toschool in thisdigital age, theres no escaping it: youll use amicrocomputer somewhere.REVIEW QUESTIONS 1. Explain how a digitalcircuit that has memory differs from one that does not.2. Name thefive major functional units of a computer.3. Which two units makeup the CPU?4. An IC chip that contains a CPU is called a_____.SUMMARY1. The two basic ways of representing the numericalvalue of physical quan-titiesare analog (continuous) and digital(discrete).2. Most quantities in the real world are analog, butdigital techniques aregenerally superior to analog techniques, andmost of the predicted ad-vanceswill be in the digital realm.3. Thebinary number system (0 and 1) is the basic system used indigitaltechnology.4. Digital or logic circuits operate on voltagesthat fall in prescribed rangesthat represent either a binary 0 or abinary 1.5. The two basic ways to transfer digital information areparallelall bitssimultaneouslyand serialone bit at a time.6. Themain parts of all computers are the input, control, memory,arith-metic/logic, and output units.7. The combination of thearithmetic/logic unit and the control unit makesup the CPU (centralprocessing unit).8. A microcomputer usually has a CPU that is on asingle chip called a mic-roprocessor.9. A microcontroller is amicrocomputer especially designed for dedicated(notgeneral-purpose) control applications.IMPORTANT TERMS*analogrepresentationdigital representationdigital systemanalogsystemanalog-to-digitalconverter (ADC)digital-to-analogconverter(DAC)decimal system*These terms can be found in boldface type inthe chapter and are defined in the Glossary at the endof the book.This applies to all chapters. 46. 22 CHAPTER 1/INTRODUCTORYCONCEPTSbinary systembittiming diagramdigitalcircuits/logiccircuitsparallel transmissionserialtransmissionmemorydigital computerprograminput unitmemoryunitcontrol unitarithmetic/logic unitoutput unitcentralprocessingunit(CPU)microprocessormicrocomputermicrocontrollerPROBLEMSSECTION1-21-1.*Which of the following are analog quantities, and which aredigital?(a) Number of atoms in a sample of material(b) Altitude ofan aircraft(c) Pressure in a bicycle tire(
sistemas digitales ronald tocci pdf download
DOWNLOAD: https://tweeat.com/2vF40A
2ff7e9595c
Comments