ECE - Digitl Logic (Textbook - Required) ECE Digitl Logic Instructor: Romn Lysecky, rlysecky@ece.rizon.edu Office Hours: TBA, ECE F Lecture: MWF :-: PM, ILC Course Website: http://www.ece.rizon.edu/~ece/ Author: ISBN: 8---- Website: http://www.cs.ucr.edu/~vhid/dd/ ECE - Digitl Logic (Textbook - Optionl) ECE - Digitl Logic (Lbs) Verilog for Author:, Romn Lysecky ISBN: 8---- Note: A good Verilog HDL book is required for this course. TAs: Lnce Sldnh, lnce@emil.rizon.edu Derek Nielson, dgn@emil.rizon.edu Lb Sections: Section : T 8:AM-:AM, ECE, TA: TBD Section : T :PM-:PM, ECE, TA: TBD Section : W :PM-:PM, ECE, TA: TBD Section : R :AM-:PM, ECE, TA: TBD Section 8: F :PM-:PM, ECE, TA: TBD ECE - Digitl Logic (Syllbus - Grding) Course Brekdown: Finl % Midterms () % Quizzes () % Lb Assignments % Homework % Design Chllenges % Grding: % A 8 % B 8% C % D Below % E All grdes re ssigned on n individul bsis. Punctulity: Don t be lte! ECE - Digitl Logic (Course Policies) Cell Phones: Plese turn your cell phone off before coming to clss! Acdemic Dishonesty: Any cdemic dishonesty will no be tolerted, plese consult the UA Code of Acdemic Integrity. ALL course work should be completed entirely on your own You re llowed to discuss generl concepts nd ides But you should not discuss specific homework or lb ssignments
ECE - Digitl Logic (Course Policies) Reding: Be prepred, red over mteril BEFORE clss. Regrdes: All requests for regrdes MUST be submitted in writing within one week of the distribution of grded mteril. Chpter : Introduction Slides to ccompny the textbook, First Edition, by, John Wiley nd Sons Publishers,. http://www.ddvhid.com Copyright Instructors of courses requiring Vhid's textbook (published by John Wiley nd Sons) hve permission to modify nd use these slides for customry course-relted ctivities, subject to keeping this copyright notice in plce nd unmodified. These slides my be posted s unnimted pdf versions on publicly-ccessible course websites.. PowerPoint source (or pdf with nimtions) my not be posted to publicly-ccessible websites, but my be posted for students on internl protected sites or distributed directly to students by other electronic mens. Instructors my mke printouts of the slides vilble to students for resonble photocopying chrge, without incurring roylties. Any other use requires explicit permission. Instructors 8 my obtin PowerPoint source or obtin specil use permissions from Wiley see http://www.ddvhid.com for informtion. Why Study?. ECE - Digitl Logic (Silicon Wfer nd Die Photos) Look under the hood of computers Solid understnding --> confidence, insight, even better progrmmer when wre of hrdwre resource issues Electronic devices becoming digitl Enbled by shrinking nd more cpble chips Enbles: Better devices: Better sound recorders, cmers, crs, cell phones, medicl devices,... New devices: Video gmes, PDAs,... Known s embedded systems Thousnds of new devices every yer Designers needed: Potentil creer direction Portble music plyers Stellites Cell phones DVD plyers Video recorders Musicl instruments Cmers TVs??? Individul IC (die) FPGA Copyright Yers shown bove indicte when digitl version begn to dominte (Not the first yer tht digitl version ppered) Note: Slides with nimtion re denoted with smll red "" ner the nimted items Pentium Processor ECE - Digitl Logic (Moore s Lw) Gordon Moore: co-founder of Intel. Predicted tht number of trnsistors per chip would grow exponentilly (double every 8 months). Anlog signl Inifinite possible vlues Ex: voltge on wire creted by microphone Sound wves Wht Does Digitl Men? Digitl signl Finite possible vlues Ex: button pressed on keypd. move the membrne, which moves the mgnet, digitl signl microphone which cretes current in the nerby wire vlue Copyright nlog signl Possible vlues:.,.,.,... infinite possibilities vlue Possible vlues:,,,, or. Tht s it.
Digitl Signls with Only Two Vlues: Binry Binry digitl signl -- only two possible vlues Typiclly represented s nd One binry digit is bit We ll only consider binry digitl signls Binry is populr becuse Trnsistors, the bsic digitl electric component, operte using two voltges (more in Chpt. ) Storing/trnsmitting one of two vlues is esier thn three or more (e.g., loud beep or quiet beep, reflection or no reflection) Copyright vlue Anlog signl (e.g., udio) my lose qulity Voltge levels not sved/copied/trnsmitted perfectly Digitized version enbles ner-perfect sve/cpy/trn. Smple voltge t prticulr rte, sve smple using bit encoding Voltge levels still not kept perfectly But we cn distinguish s from s Let bit encoding be: V: V: V: Copyright Exmple of Digitiztion Benefit Digitized signl not perfect re-cretion, but higher smpling Volts Volts Volts rte nd more bits per encoding brings closer. originl signl d digitized signl d lengthy trnsmission (e.g, cell phone) lengthy trnsmission (e.g, cell phone) sme received signl How fix -- higher, lower,? Cn fix -- esily distinguish s nd s, restore Digitized Audio: Compression Benefit Digitized udio cn be compressed e.g., MPs A CD cn hold bout songs uncompressed, but bout compressed Compression lso done on digitized pictures (jpeg), movies (mpeg), nd more Digitiztion hs mny other benefits too Copyright Exmple compression scheme: --> --> X --> X How Do We Encode Dt s Binry for Our Digitl System? nlog phenomen electric signl AD digitl dt digitl dt sensors nd other inputs Digitl System DA electric signl ctutors nd other outputs digitl dt digitl dt Copyright Some inputs inherently binry Button: not pressed (), pressed () Some inputs inherently digitl Just need encoding in binry e.g., multi-button input: encode red=, blue=,... Some inputs nlog Need nlog-to-digitl conversion As done in erlier slide -- smple nd encode with bits red red red button blue blue blue ir green green green temperture sensor blck blck blck degrees How to Encode Text: ASCII, Unicode How to Encode Numbers: Binry Numbers ASCII: - (or 8-) bit encoding of ech letter, number, or symbol Unicode: Incresingly populr -bit bit encoding Encodes chrcters from vrious world lnguges Symbol R S T L N E. <tb> Encoding Symbol r s t l n e! <spce> Encoding Question: Wht does this ASCII bit sequence represent? R E S T Ech position represents quntity; symbol in position mens how mny of tht quntity Bse ten (deciml) Ten symbols:,,,..., 8, nd More thn -- next position So ech position power of Nothing specil bout bse -- used becuse we hve fingers Bse two (binry) Two symbols: nd More thn -- next position So ech position power of Q: How much? + = + = Copyright Note: smll red () in slide indictes nimtion Copyright 8
How to Encode Numbers: Binry Numbers Working with binry numbers In bse ten, helps to know powers of one, ten, hundred, thousnd, ten thousnd,... In bse two, helps to know powers of one, two, four, eight, sixteen, thirty two, sixty four, one hundred twenty eight (Note: unlike bse ten, we don t hve common nmes, like thousnd, for ech position in bse ten -- so we use the bse ten nme) Q: count up by powers of two Copyright 8 8 8 8 8 How to Encode Numbers: Binry Numbers Bse (binry) Arithmetic Eights ( ) column Fours ( ) column Twos ( ) column Ones ( ) column = x + x + x + x Convert the following vlue from binry (zero s nd one s) to deciml vlue =????? Choose your nswer: A), B) C) 8 Converting from Deciml to Binry Numbers: Subtrction Method (Esy for Humns) Converting from Deciml to Binry Numbers: Subtrction Method (Esy for Humns) Gol Get the binry weights to dd up to the deciml quntity Work from left to right (Right to left my fill in s tht shouldn t hve been there try it). Desired deciml number: 8 = 8 = 8 =8 8 ok, keep going Subtrction method To mke the job esier (especilly for big numbers), we cn just subtrct selected binry weight from the (remining) quntity Then, we hve new remining quntity, nd we strt gin (from the present binry position) Stop when remining quntity is Remining quntity: 8 is 8 is 8 8 = 8 =8+= 8 DONE -= 8 DONE Copyright nswer 8 Copyright nswer 8 Converting from Deciml to Binry Numbers: Subtrction Method Exmple Converting from Deciml to Binry Numbers: Division Method (Good for Computers) Q: Convert the number from deciml to binry A: Remining quntity Binry Number 8 Copyright - - - - 8 8 8 is more thn, cn t use 8 8 Done! in deciml is in binry. Divide deciml number by nd insert reminder into new binry number. Continue dividing quotient by until the quotient is. Exmple: Convert deciml number to binry Deciml Number Binry Number divide by - insert reminder Continue dividing since quotient () is greter thn divide by - insert reminder Continue dividing since quotient () is greter thn Copyright
M r op r o c Converting from Deciml to Binry Numbers: Division Method (Good for Computers) Exmple: Convert deciml number to binry (continued) Deciml Number Binry Number divide by - insert reminder Continue dividing since quotient () is greter thn divide by 8 - insert reminder Since quotient is, we cn conclude tht is in binry Encoding: Number Systems Bse (binry) Arithmetic Convert the following deciml vlue to binry (zero s nd one s) vlue =??????? Choose your nswer: A) B) C) Copyright Bse Sixteen: Another Bse Somes Used by Digitl Designers Encoding: Number Systems: System Conversion hex binry hex binry Nice becuse ech position represents four bse two positions Used s compct mens to write binry numbers Known s hexdeciml, or just hex hex binry hex binry Convert the following hexdeciml vlue to binry (zero s nd one s) vlue 8 8 CAB =???????????? A B C D E F Q: Write in hex F A B C D E F Choose your nswer: A) B) C) Copyright 8 Implementing Digitl Systems: Progrmming Microprocessors Vs. Designing Digitl Circuits Desired motion-t-night detector Copyright I I I I I I I I P P P P P P P P Progrmmed microprocessor Custom designed digitl Microprocessors common choice to implement digitl system Esy to progrm Chep (s low s $) Avilble now void min() { while () { P = I &&!I; b // F = nd!b, } F } : :: ::. : When Microprocessors Aren t Good Enough With microprocessors so esy, chep, nd vilble, why design digitl? Microprocessor my be too slow Or too big, power hungry, or costly Smple digitl cmer tsk execution s (in seconds) on microprocessor versus digitl : Tsk Microprocessor Custom Digitl Circuit Red. Compress 8. Store.8 Copyright Imge Sensor Microprocessor () (Red, Compress, Memory nd Store) (b) (c) Imge Sensor Memory Imge Sensor Memory Red Red Q: How long for ech implementtion option? Compress Store Compress Microprocessor (Store) +8+ = sec.+.+.8 =. sec.+.+ =. sec Good compromise
Chpter Summry Digitl systems surround us Inside computers Inside huge vriety of other electronic devices (embedded systems) Digitl systems use s nd s Encoding nlog signls to digitl cn provide mny benefits e.g., udio -- higher-qulity storge/trnsmission, compression, etc. Encoding integers s s nd s: Binry numbers Microprocessors (themselves digitl) cn implement mny digitl systems esily nd inexpensively But often not good enough -- need custom digitl s Where do we go from here? ECE Course Gols: Combintionl Logic Design Sequentil Logic Design Design of Common Dt Components Register-Trnsfer Level (RTL) Design Modern pproch to Optimiztion of Digitl Circuits using HDL (Verilog) Copyright (Humor?) There re types of people in the world: Those who get binry nd those who don t.