igitl Logic ll igitl esign MW -:PM, IL Romn Lysecky, rlysecky@ece.rizon.edu http://www.ece.rizon.edu/~ece hpter : Introduction Slides to ccompny the textbook igitl esign, irst dition, by rnk Vhid, John Wiley nd Sons Publishers,. http://www.ddvhid.com opyright rnk Vhid Instructors of courses requiring Vhid's igitl esign 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. ny other use requires explicit permission. Instructors my obtin PowerPoint source or obtin specil use permissions from Wiley see http://www.ddvhid.com for informtion.. Why Study igitl esign? Look under the hood of computers Solid understnding --> confidence, insight, even better progrmmer when wre of hrdwre resource issues nlog signl Infinite possible vlues x: voltge on wire creted by microphone lectronic devices becoming nbled by shrinking nd more cpble chips nbles: etter devices: etter sound recorders, cmers, crs, cell phones, medicl devices,... New devices: Video gmes, Ps,... Stellites V plyers ell phones Video recorders mers (Not the first yer tht version ppered) Possible vlues:.,.,.,... infinite possibilities Musicl instruments TVs??? Yers shown bove indicte when version begn to dominte inite possible vlues x: button pressed on keypd signl nlog signl Thousnds of new devices every yer esigners needed: Potentil creer direction Portble music plyers Known s embedded systems igitl signl vlue Wht oes igitl Men? vlue. Possible vlues:,,,, or. Tht s it.
inry - igitl Signls with Only Two Vlues xmple of igitiztion inry signl -- only two possible vlues Typiclly represented s nd One binry digit is bit We ll only consider binry signls inry is populr becuse Trnsistors, the bsic electric component, operte using two voltges Storing/trnsmitting one of two vlues is esier thn three or more (e.g., loud beep or quiet beep, reflection or no reflection) vlue nlog signl (e.g., udio) my lose qulity Voltge levels not sved/ copied/trnsmitted perfectly igitized version enbles ner-perfect sve/cpy/trn. Smple voltge t prticulr rte, sve smple using bit encoding Voltge levels still not kept perfectly ut we cn distinguish s from s Let bit encoding be: V: V: V: igitized signl not perfect re-cretion, but higher smpling 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,? n fix -- esily distinguish s nd s, restore How o We ncode t s inry for Our igitl System? How to ncode Numbers: inry Numbers nlog phenomen electric signl sensors nd other inputs igitl System electric signl ctutors nd other outputs Some inputs inherently binry utton: not pressed (), pressed () Some inputs inherently Just need encoding in binry e.g., multi-button input: encode red=, =,... Some inputs nlog Need nlog-to- conversion s done in erlier slide -- smple nd encode with bits button ir temperture sensor blck blck blck degrees ch position represents quntity; symbol in position mens how mny of tht quntity se ten (deciml) Ten symbols:,,,...,, nd More thn -- next position So ech position power of Nothing specil bout bse -- used becuse we hve fingers se two (binry) Two symbols: nd More thn -- next position So ech position power of
How to ncode Numbers: inry 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) Wht is the vlue of the binry number in deciml?.,... Numbers Subtrction Method (sy 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). Subtrction method 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: is too much is too much = -= ON nswer Wht is the vlue of the deciml number in binry?....
ivision Method (Good for omputers) ivide deciml number by nd insert reminder into new binry number. ontinue dividing quotient by until the quotient is. xmple: onvert deciml number to binry eciml Number divide by - insert reminder inry Number ontinue dividing since quotient () is greter thn divide by - insert reminder ontinue dividing since quotient () is greter thn xmple: onvert deciml number to binry (continued) eciml Number divide by - insert reminder inry Number ontinue dividing since quotient () is greter thn divide by - insert reminder Since quotient is, we cn conclude tht is in binry Hexdeciml Numbers Wht is the vlue of the deciml number in binry?.... None of the bove Nice becuse ech position represents four bse two positions Used s compct mens to write binry numbers Known s hexdeciml, or just hex onvert to hex:
onverting from Hexdeciml to inry onverting from Hexdeciml to eciml Wht is the vlue of the hexdeciml number in binry? Wht is the vlue of the hexdeciml number in deciml?........ n ttempt t humor There re types of people in the world: Those who get binry nd those who don t. Which type re you?. I get it.. I don t get it.