1 / 99

Introduction to Computer Engineering

Learn about the importance of transistors in building computer systems, including their role in logic functions and higher-level structures. Discover how they are used in microprocessors and gain an understanding of their operation.

dkeen
Download Presentation

Introduction to Computer Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS/ECE 252, Fall 2016 Kai Zhao Computer Sciences Department University of Wisconsin – Madison Introduction to Computer Engineering

  2. Chapter 3Digital LogicStructures Slides based on set prepared by Gregory T. Byrd, North Carolina State University

  3. In Class Exercise 1. Convert “Transistor” to hex 2. Convert the results above to binary

  4. Transistor: Building Block of Computers Microprocessors contain millions of transistors • Intel Pentium II: 7 million • Compaq Alpha 21264: 15 million • Intel Pentium III: 28 million Logically, each transistor acts as a switch Combined to implement logic functions • AND, OR, NOT Combined to build higher-level structures • Adder, multiplexer, decoder, register, … Combined to build processor • LC-3

  5. Operating System CS537 Abstraction and Complexity • Abstraction helps us manage complexity • Complex interfaces • Specify what to do • Hide details of how Application Program CS302 Compiler CS536 Machine Language (ISA) CS/ECE354 • Goal: Use abstractions yet still understand details Computer Architecture CS/ECE552 Scope of this course Digital Design CS/ECE352 Electronic circuits ECE340

  6. Simple Switch Circuit Switch open: • No current through circuit • Light is off • Vout is +2.9V Switch closed: • Short circuit across switch • Current flows • Light is on • Vout is 0V Switch-based circuitscan easily represent two states: on/off, open/closed, voltage/no voltage.

  7. “Miracle Month” of November 17 to December 23, 1947

  8. Transistor physical diagram

  9. Silicon by itself is semiconductor • Has 4 valence electrons and forms a co-valent bond with 4 neighbors • Hard to break and does not conduct 

  10. Silicon by itself is insulator • Has 4 valence electrons and forms a co-valent bond with 4 neighbors • Had to break and does not conduct  • Silicon + Arsenic makes it filled with electrons and conducting • Silicon + Boron makes it filled with “holes” and conducting

  11. nmos and pmos Transistors

  12. Transistor Operation (nmos) Gate: @Vdd sets up electric fieldattracts to boundary Gate-oxide (insulator) Source Drain p-type n-type n-type Channel

  13. If the figure on the left is a (musical) conductor, then what is the figure on the right? semiconductor

  14. N-type MOS Transistor MOS = Metal Oxide Semiconductor • two types: N-type and P-type N-type • when Gate has positive voltage,short circuit between #1 and #2(switch closed) • when Gate has zero voltage,open circuit between #1 and #2(switch open) Gate = 1 Gate = 0 Terminal #2 must be connected to GND (0V).

  15. P-type MOS Transistor P-type is complementary to N-type • when Gate has positive voltage,open circuit between #1 and #2(switch open) • when Gate has zero voltage,short circuit between #1 and #2(switch closed) Gate = 1 Gate = 0 Terminal #1 must be connected to +2.9V.

  16. Logic Gates Use switch behavior of MOS transistorsto implement logical functions: AND, OR, NOT. Digital symbols: • recall that we assign a range of analog voltages to eachdigital (logic) symbol • assignment of voltage ranges depends on electrical properties of transistors being used • typical values for "1": +5V, +3.3V, +2.9V, +1.1V • for purposes of illustration, we'll use +2.9V

  17. CMOS Circuit Complementary MOS Uses both N-type and P-type MOS transistors • P-type • Attached to + voltage • Pulls output voltage UP when input is zero • N-type • Attached to GND • Pulls output voltage DOWN when input is one For all inputs, make sure that output is either connected to GND or to +,but not both!

  18. Transistor Supply Voltage Source Output Gate Gate Gate Drain Output Ground Transistor terminals N-type transistor P-type transistor

  19. Vdd Vdd NOT Gate with Transistors Q=0 Vdd A=0 A=1 Q=1 ON OFF Q A OFF ON

  20. Inverter (NOT Gate) Truth table

  21. NOR Gate Note: Serial structure on top, parallel on bottom.

  22. OR Gate Add inverter to NOR.

  23. NAND Gate (AND-NOT) Note: Parallel structure on top, serial on bottom.

  24. AND Gate Add inverter to NAND.

  25. Basic Logic Gates

  26. In-Class Exercise 1b 8b 23b S Exponent Fraction • Convert 777 to IEEE 32-bit floating point • Convert the results back to decimal

  27. In-Class Exercise 1b 8b 23b S Exponent Fraction • Convert 777 to IEEE 32-bit floating point • 777 = 1100001001 = 1.100001001 * 2^9 • 9 = exp – 127 • exp = 136 = 10001000 • sign = 0 since positive • 01000100010000100100000000000000 • Convert the results back to decimal

  28. In-Class Exercise 1b 8b 23b S Exponent Fraction • Convert 777 to IEEE 32-bit floating point • Convert the results back to decimal • 01000100010000100100000000000000 • 0b10001000 = 0d136 • N = (-1)^S * 1.fraction * 2^(exp-127) • N = (-1)^0 * 1.100001001 * 2^(136-127) • N = 1* 1.100001001 * 2^9 • N = 1100001001.0 • N = 777

  29. Take-home exerciseFill out the truth table for the following transistor circuit

  30. Common Misconceptions

  31. More than 2 Inputs? AND/OR can take any number of inputs. • AND = 1 if all inputs are 1. • OR = 1 if any input is 1. • Similar for NAND/NOR. Can implement with multiple two-input gates,or with single CMOS circuit.

  32. Practice Implement a 3-input NOR gate with CMOS.

  33. Logical Completeness Can implement ANY truth table with AND, OR, NOT. 1. AND combinations that yield a "1" in the truth table. 2. OR the resultsof the AND gates.

  34. Practice Implement the following truth table.

  35. DeMorgan's Law Converting AND to OR (with some help from NOT) Consider the following gate: To convert AND to OR (or vice versa), invert inputs and output. Same as A+B!

  36. Summary MOS transistors are used as switches to implementlogic functions. • N-type: connect to GND, turn on (with 1) to pull down to 0 • P-type: connect to +2.9V, turn on (with 0) to pull up to 1 Basic gates: NOT, NOR, NAND • Logic functions are usually expressed with AND, OR, and NOT Properties of logic gates • Completeness • can implement any truth table with AND, OR, NOT • DeMorgan's Law • convert AND to OR by inverting inputs and output

  37. Building Functions from Logic Gates We've already seen how to implement truth tablesusing 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.

  38. In-class exerciseFill out the truth table for the following transistor circuit Use DeMorgan’s Law to simplify NOT(NOT(A) AND (NOT(B) OR C))

  39. In-class exerciseFill out the truth table for the following transistor circuit Use DeMorgan’s Law to simplify NOT(NOT(A) AND (NOT(B) OR C)) NOT(NOT(A)) OR NOT(NOT(B) OR C) A OR (B AND NOT(C))

  40. Logical Completeness Can implement ANY truth table with AND, OR, NOT. 1. AND combinations that yield a "1" in the truth table. 2. OR the resultsof the AND gates.

  41. Decoder n inputs, 2n outputs • exactly one output is 1 for each possible input pattern 2-bit decoder

  42. Multiplexer (MUX) n-bit selector and 2n inputs, one output • output equals one of the inputs, depending on selector 4-to-1 MUX

  43. Half Adder Add two bits,produce one-bit sum and carry-out.

  44. Full Adder from Half Adder Add two bits and carry-in,produce one-bit sum and carry-out.

  45. Full Adder Add two bits and carry-in,produce one-bit sum and carry-out.

  46. Four-bit Adder

  47. 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”

  48. In-Class Exercise Note: Bits are numbered starting from 0 from right to left. So if X = 10110, then X[4] = 1, X[3] = 0, X[2] = 1, X[1] = 1, and X[0] = 0. • Find A, B, C, D, E, and F

  49. In-Class Exercise Solutions Note: Bits are numbered starting from 0 from right to left. So if X = 10110, then X[4] = 1, X[3] = 0, X[2] = 1, X[1] = 1, and X[0] = 0. A=0 B=0 C=1 D=0 E=0 F=1 • Find A, B, C, D, E, and F

  50. Course Evaulations "If I had one hour left to live I would spend it in this class because it feels like an eternity."

More Related