Transistors and Logic Gates - UNC A

Transistors and Logic Gates - UNC A

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Building Functions from Logic Gates We've already seen how to implement truth tables using AND, OR, and NOT -- an example of combinational logic. Combinational Logic Circuit output depends only on the current inputs stateless Sequential Logic Circuit output depends on the sequence of inputs (past and present) stores information (state) from past inputs We'll first look at some useful combinational circuits, then show how to use sequential circuits to store

information. 3-2 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Full Adder Consider computing 7+6=13: A combinational logic design Now, consider one column of this addition: 3-3 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-bit Full Adder

Truth table for a 1-bit adder: A 0 0 0 0 1 1 1 1 Inputs | Outputs B CarryIn | Sum CarryOut 0 0 | 0 1

| 1 0 | 1 1 | 0 0 | 0 1 | 1 0 | 1 1 | Formulate a circuit for each output 3-4

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The Majority Circuit for CarryOut 3-5 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Odd-Parity Circuit for the Sum 3-6 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Putting It All Together: Full Adder

Add two bits and carry-in, produce one-bit sum and carry-out. A B Cin S Cout 0 0 0 0 0 0 0 1

1 0 0 1 0 1 0 0 1 1

0 1 1 0 0 1 0 1 0 1

0 1 1 1 0 0 1 1 1 1

1 1 3-7 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Four-bit Adder 3-8 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multiplexer (MUX) A device with multiple inputs and 1 output

Could be used to allocate a resource to one of multiple clients: 3-9 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. MUX A 2n-to-1 multiplexer (MUX) sends one of 2n input lines to a single output line A MUX has two sets of inputs: 2n data input lines n select lines used to pick one of the 2n data inputs

Simplest example is a 2-to-1 MUX 3-10 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2-to-1 MUX 3-11 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multiplexer (MUX) n-bit selector and 2n inputs, one output output equals one of the inputs, depending on selector

00 01 10 11 4-to-1 MUX 3-12 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4-to-1 MUX from Two 2-to-1 MUXs S1

S0 3-13 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Decoder General example: Assume that some information is encoded in n bits For each encoding, we want to activate the (one) correct output line The general idea: given an n-bit input Detect which of the 2n combinations is represented Produce 2n output, only one of which is 1 A n-to-2n decoder takes an n-bit input and produces 2n

outputs. The n inputs represent a binary number that determines which one of the 2n outputs is true (i.e., 1). 3-14 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2-to4 Decoder This circuit decodes a binary input into one of four possible choices, or codes 3-15 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Decoder

n inputs, 2n outputs exactly one output is 1 for each possible input pattern 2-bit decoder 3-16 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Representing Multi-bit Values Number bits from right (0) to left (n-1) just a convention -- could be left to right, but must be consistent Use brackets to denote range: D[l:r] denotes bit l to bit r, from left to right

0 15 A = 0101001101010101 A[14:9] = 101001 A[2:0] = 101 May also see A<14:9>, especially in hardware block diagrams. 3-17 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multibit Values in Circuit Diagrams

A 4-to-1 mux, selecting one byte out of a 32-bit value... 3-18 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. MUX example -- what does this circuit do? 3-19 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs ex: adder always generates sum and carry,

regardless of previous inputs Sequential Circuit stores information output depends on stored information (state) plus input so a given input might produce different outputs, depending on the stored information example: ticket counter advances when you push the button output depends on previous state useful for building memory elements and state machines 3-20

Recently Viewed Presentations

  • Presented by Abu Zakariya Aims and Objectives  This

    Presented by Abu Zakariya Aims and Objectives This

    The view of two natures became orthodoxy. Today it is the mainstream position in Catholicism, Protestantism and Eastern Orthodox Christianity. The official position of these churches is that all the other groups, with their different views about Jesus, are heretics,...
  • Colonization of Mars

    Colonization of Mars

    Landing on Mars: Since Mars has only about 40% of the gravity that Earth has landing a heavy shuttle on the surface of Mars would be difficult. Landing Locations: Likely sites are caves near the Arsia Mons volcano, Valles Marineris...
  • Malaria_Synod_Assembly_Picture_Slideshow.pptx

    Malaria_Synod_Assembly_Picture_Slideshow.pptx

    Malawi: Judith Jere is the Lutheran malaria program coordinatorand educates others about prevention. Zambia: Suvia received preventative malaria treatment during pregnancy. Zimbabwe: Malaria messages are delivered through song and dance.
  • Proficiency in Sentence Writing

    Proficiency in Sentence Writing

    Simple Sentence Formulas: S (Subject) V (verb) SV. SS V. S VV. SS VV. Yes, a simple sentence can be long and have two subjects and two verbs! SV example. The big bear was standing on top of the picnic...
  • Lecture 4: Phasors; Discrete-Time Sinusoids Sections 1.4, 1.5

    Lecture 4: Phasors; Discrete-Time Sinusoids Sections 1.4, 1.5

    Key Points. The stationary phasor of Acos( t + ) is the complex number Aej .The sum of two (or more) sinusoids of arbitrary amplitudes and phases but of identical frequency is a sinusoid of frequency .Sinusoids of identical frequency...
  • From Classical to Contemporary

    From Classical to Contemporary

    Filming Space and Time HUM 3280: Narrative Film Fall 2014 Dr. Perdigao September 22-24, 2014
  • Early Years Conference Cairns Todays Children Tomorrows Future

    Early Years Conference Cairns Todays Children Tomorrows Future

    While Australian Government laws require certain levels of access, provision across States and Territories varies markedly. Some jurisdictions provide most of their preschool education through preschools attached to schools (ACT, SA, WA, NT, TAS).
  • Itron overview of VT load forecast methodology

    Itron overview of VT load forecast methodology

    VELCO Long-Term Demand Forecast Methodology Overview Eric Fox Oleg Moskatov Itron, Inc. April 17, 2008 * * * * * * * * * * * * * * * Commercial End-Uses (EIA) Heating Cooling Other Use Ventilation Water heating...