Soifwewanttobuildsomekindofoutputdisplayfor a computer, wecanuse a registerjustlikewe'vebuiltinthepast, wherewecanpush a valueintothatregisterandthenhavesomewayofdisplayingthecontentsoftheregister.
Andthiswouldbetheoutputofthecomputer.
It's onthiscase.
Youcanseewehave a nicebinaryoutputforforthecomputer, butwouldbemuchnicerisifwhenweputcontentsintothatregisterinsteadofgetting a binaryoutput, weget a nicedecimaloutputlikethis, whichismuchmoreuserfriendly.
Let's take a lookathowthesedisplaymodulesworksoyoucanseethere's somepinsontheback.
Andthen, ofcourse, ourdisplayhere.
Andhere's thedatasheetthatcomeswithit, or I guess, justsortofthepackaging, anditcomesin a coupledifferentkinds.
Theonethat I haveisblue, anditsayscommoninowed.
Whatthatmeansisthatthere's a bunchofladiesinsidethispackageforeachofthesedifferentsegmentsandalloftheanodethey'retiedtogether, saysthepositivesideoftheofeachoftheseladiesaretiedtogetherandonpinsthreeandeight.
Andsoifyoulookatjustoneofthosecaseswhentheoutputsareone, theinputsareoneare 0001 Andsothat's actuallywhatthesthree n gatesdohere.
Youcanalwaysthinkofthese.
Three n Gatesisas a fourinputandgate.
I'm justusingtoinputandgatesforbecauseit's what I have.
Butwhatyouseeis I'm taking I'm handingtogether D zero.
Sowhen d zeroisonelikethiswhen d one d toAndythreeareallzerosbecauseifthey'rezeroesthanthecomplimentofthemwillbeones.
Andthenallfouroftheseinputswillbeone.
AndifallfourofthoseinputsAirOnethanbothoftheseoutputs, whereoneandthisoutputisone, andthenthatoutputtheregetswordtogetherwiththerestofthestuff, um, andandwilleventuallyturnthefinaloutputonthis A whichofcourse, meansthatthatinputwillbe a oneandthesegmentwillbeoffjustlikeitshouldbeforthenumberonethattopsegmentsnotoninnumberone.
Samethingforforherethisisah, thenumberfour.
YouseeNumberfour.
It's alsooff.
Sothenumberfour D twoishigh, but D zero D oneandthreearelow.
Take a CDtowhenthat's theone.
Butwhen d zero d oneand d threewhentheircomplimentsareone.
Sohe's alreadywonan D threewhenthoseairalloneAndwhenthecomplimentofdeTuIsaone.
So, inotherwords, itWendytozero.
Ifallofthatistrue, thenwealsoturnonouroutput.
Andthenfinally, for D theletter D, whichisherethattopsegmentsalsonoton.
Sofor D, wehavedesireistheonethe 10 d toAndythreeorones, andthat's what's goingondownhere.
Andactually, I took a littlebitof a shortcutandsavedourselvesanandgatebecausefor D zerotobeonandtheonetobeoff, we'vealreadygotthatuphereso I couldjustpullthatdownonandsavesavingandgate.
Butthen, ofcourse, andtogetherthecasewhere d twoand D threearebothones.
Otherwise, ifforinanyotherstate, thisoutputwillbezeroandsothiscircuitgivesuseverythingweneedinordertodeterminewhetheryouknowthisonetopsegment, thissegmenthereshouldbehonoroff, given a fourbitinput.
Andsoyoucanimagineifwedothesamethingforeachofthesesevensegmentsandbuild a similarcircuit.
Atleast I didn't make a mistakethere, butassumingitdidn't makeanymistakeshere, thisisthetruthtablethatwillgetus a circuitthatdoesthisand I realizeis a littlebitmessy.
Butthisisthecircuitthat I cameupwith, andyoucanseeit's verysimilartothecircuitthatwesawbefore, whichhasthe D zerothrough D threeandthentheinvertedDeezerthrough D three.
Andthenwe'relookingatatcombinationsofthose.
It's thesamething.
Infact, thistopparthereisidenticaltowhatwedidforSegment A.
Andthenthere's additionalsitepartsforSegment B, C, D, E and F G.
Butagain I wasabletosavesomegatesbecauseinsomecasessomeofthesethingswereusedpreviously, and I could I couldsavesomegatesbutevensaidverycomplexcircular, atleastverylargecircuitintermsofnumberofgates.
And I imaginethere's probablysomepeoplewatchingthisthatcanlookatthisandfindwaystosimplifyit a littlebitandremovesomeofthesegates.
Butstill, it's goingtobefairly, fairlycomplex.
Andso, justtodemonstratethat, ofcourse, I builtthethingandthisiswhatitlookslike.
Sointhenextvideo, I'm gonnashowyou a waytouse E prom's toreplaceanycombinationalllogiccircuit.
Andthisis a combinationoflogiccircuitbecausebasicallyithas.
Foreachinput, thereis a singleoutput, anditdoesn't dependonstateoranything.
Sothisiskindoftwokindsoflogiccircuits.
There's combinationoflogic, whichislikethis.
Soforwhatevercanput, wegiveit, weget a particularoutputastheoutputisjust a functionoftheinputs.
Ah, andthenthere's, Ah, sequentiallogic, whichisthingslikelatchesandflipflops, encountersandsomeofsomeoftheotherthingswe'veseenwherethecurrentstateofitdependsonwhathappenedpreviously, andthere's usually a clockinvolved, andthat's sequentiallogic.
Butforsomethinglikethis, whichispurelycombinationoflogic, there's a simplerandmoreflexiblewaytobuildprettymuchanycombinationoflogiccircuitusinganyproblems.
Soifwewanttobuildsomekindofoutputdisplayfor a computer, wecanuse a registerjustlikewe'vebuiltinthepast, wherewecanpush a valueintothatregisterandthenhavesomewayofdisplayingthecontentsoftheregister.