CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 19, SPRING 2013

Similar documents
B I N G O B I N G O. Hf Cd Na Nb Lr. I Fl Fr Mo Si. Ho Bi Ce Eu Ac. Md Co P Pa Tc. Uut Rh K N. Sb At Md H. Bh Cm H Bi Es. Mo Uus Lu P F.

All answers must use the correct number of significant figures, and must show units!

Chem 115 POGIL Worksheet - Week 4 Moles & Stoichiometry Answers

ELECTRON CONFIGURATION (SHORT FORM) # of electrons in the subshell. valence electrons Valence electrons have the largest value for "n"!

Chem 115 POGIL Worksheet - Week 4 Moles & Stoichiometry

CLASS TEST GRADE 11. PHYSICAL SCIENCES: CHEMISTRY Test 6: Chemical change

From Quantum to Matter 2006

8. Relax and do well.

Find a pair of elements in the periodic table with atomic numbers less than 20 that are an exception to the original periodic law.

EXPERIMENT 4 The Periodic Table - Atoms and Elements

100% ionic compounds do not exist but predominantly ionic compounds are formed when metals combine with non-metals.

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Electronegativity and Polarity

Exam 1. Spring 2012/13 CHE 140 Section: 5701 & total points Date: Mon. Feb. 11 & Tue. Feb. 12, 2013

It takes four quantum numbers to describe an electron. Additionally, every electron has a unique set of quantum numbers.

Inorganic Chemistry review sheet Exam #1

The Lewis structure is a model that gives a description of where the atoms, charges, bonds, and lone pairs of electrons, may be found.

ORTEC DET-SW-UPG. Latest Software Features. Ease of Use. Source Location with the Detective V3 Software

The Role of Triads in the Evolution of the Periodic Table: Past and Present

Chapter 2 Lecture Notes: Atoms

CHAPTER 3 Boolean Algebra and Digital Logic

MODERN ATOMIC THEORY AND THE PERIODIC TABLE

Gates & Boolean Algebra. Boolean Operators. Combinational Logic. Introduction

UNIT (2) ATOMS AND ELEMENTS

B) atomic number C) both the solid and the liquid phase D) Au C) Sn, Si, C A) metal C) O, S, Se C) In D) tin D) methane D) bismuth B) Group 2 metal

Role of Hydrogen Bonding on Protein Secondary Structure Introduction

Gates, Circuits, and Boolean Algebra

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

PERIODIC TABLE OF GROUPS OF ELEMENTS Elements can be classified using two different schemes.

Binary Adders: Half Adders and Full Adders

chemrevise.org 19/08/2013 Periodicity N Goalby chemrevise.org

CSE140: Midterm 1 Solution and Rubric

5.4 Trends in the Periodic Table

Logic in Computer Science: Logic Gates

Periodic Table Questions

Chapter 8 Atomic Electronic Configurations and Periodicity

Chemistry CP Unit 2 Atomic Structure and Electron Configuration. Learning Targets (Your exam at the end of Unit 2 will assess the following:)

Ionizing Radiation, Czech Republic, CMI (Czech Metrology Institute)

Basic Logic Gates Richard E. Haskell

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Natural Sciences I. Lecture 15: Elements and the Periodic Table

WASTE STREAM 2Y51 Analytical Services Process Facilities - North Labs

Standard Operation Procedure. Elemental Analysis of Solution samples with Inductively Coupled Plasma Mass Spectrometry

47374_04_p25-32.qxd 2/9/07 7:50 AM Page Atoms and Elements

CVD SILICON CARBIDE. CVD SILICON CARBIDE s attributes include:

Sustainable energy products Simulation based design for recycling

Unit 2 Matter and Chemical Change. Unit Test

Understanding Logic Design

BOOLEAN ALGEBRA & LOGIC GATES

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

REVIEW QUESTIONS Chapter 8

Lecture 5. elements (Figure 1). In addition, there are many ways of classifying trace elements.

1.- L a m e j o r o p c ió n e s c l o na r e l d i s co ( s e e x p li c a r á d es p u é s ).

Nomenclature and Formulas of Ionic Compounds. Section I: Writing the Name from the Formula

Chemistry: The Periodic Table and Periodicity

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Chapter 2: Boolean Algebra and Logic Gates. Boolean Algebra

CSEE 3827: Fundamentals of Computer Systems. Standard Forms and Simplification with Karnaugh Maps

2.0 Chapter Overview. 2.1 Boolean Algebra

NEW adder cells are useful for designing larger circuits despite increase in transistor count by four per cell.

Towards a Circular Economy rethinking value chains to boost resource productivity

Lecture 8: Synchronous Digital Systems

Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

3. What would you predict for the intensity and binding energy for the 3p orbital for that of sulfur?

High-tech recycling of critical metals: Opportunities and challenges

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

Digital Electronics Detailed Outline

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

CHEM 107 (Spring-2005) Final Exam (100 pts)

Karnaugh Maps & Combinational Logic Design. ECE 152A Winter 2012

Web Typography Sucks

Chapter 11. Electrochemistry Oxidation and Reduction Reactions. Oxidation-Reduction Reactions. Oxidation-Reduction Reactions

X-RAY DATA BOOKLET Center for X-ray Optics and Advanced Light Source Lawrence Berkeley National Laboratory

SUS. Company Profile. Ulrich Nell, Feldstr.23, D Oberhausen, Tel. 0049(0)208/ Fax 0049(0)208/658536

Qualitätsmanagement-Handbuch

XIX. Chemistry, High School

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Nomenclature of Ionic Compounds

The components. E3: Digital electronics. Goals:

Analyses on copper samples from Micans

Two-level logic using NAND gates

PERIODIC TABLE OF THE ELEMENTS

Negative Integral Exponents. If x is nonzero, the reciprocal of x is written as 1 x. For example, the reciprocal of 23 is written as 2

Chapter 2 Atoms, Ions, and the Periodic Table

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Counters and Decoders

Chapter 8 - Chemical Equations and Reactions

Nuclear ZPE Tapping. Horace Heffner May 2007

Let s put together a Manual Processor

Combinational Logic Design Process

Electronegativity and Polarity MAIN Idea A chemical bond s character is related to each atom s

Memory Elements. Combinational logic cannot remember

WASTE STREAM 2F35 Excellox-Type Transport Flasks and French-Design Dry Flasks

Chapter 2 Logic Gates and Introduction to Computer Architecture

Circuits and Boolean Expressions

Lecture 5: Gate Logic Logic Optimization

Boolean Algebra Part 1

2. John Dalton did his research work in which of the following countries? a. France b. Greece c. Russia d. England

Victims Compensation Claim Status of All Pending Claims and Claims Decided Within the Last Three Years

Transcription:

CMSC 33 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 9, SPRING 23

TOPICS TODAY Introduction to Digital Logic Semiconductors, Transistors & Gates

INTRODUCTION TO DIGITAL LOGIC

Chapter 3 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple logic circuits. Understand how digital circuits work together to form complex computer systems. 2

A-3 Appendix A: Digital Logic Some Definitions Combinational logic: a digital logic circuit in which logical decisions are made based only on combinations of the inputs. e.g. an adder. Sequential logic: a circuit in which decisions are made based on combinations of the current inputs as well as the past history of inputs. e.g. a memory unit. Finite state machine: a circuit which has an internal state, and whose outputs are functions of both current inputs and its internal state. e.g. a vending machine controller. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

A-4 Appendix A: Digital Logic The Combinational Logic Unit Translates a set of inputs into a set of outputs according to one or more mapping functions. Inputs and outputs for a CLU normally have two distinct (binary) values: high and low, and, and, or 5 V and V for example. The outputs of a CLU are strictly functions of the inputs, and the outputs are updated immediately after the inputs change. A set of inputs i i n are presented to the CLU, which produces a set of outputs according to mapping functions f f m. i i i n... Combinational logic unit... f (i, i ) f (i, i 3, i 4 ) f m (i 9, i n ) Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

3-6 Ripple Carry Adder Chapter 3: Arithmetic Two binary numbers A and B are added from right to left, creating a sum and a carry at the outputs of each full adder for each bit position. b 3 a 3 c 3 b 2 a 2 c 2 b a c b a c Full adder Full adder Full adder Full adder c 4 s 3 s 2 s s Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

A-45 Appendix A: Digital Logic Classical Model of a Finite State An FSM is composed of a combinational logic unit and delay elements (called flip-flops) in a feedback path, which maintains state information. Inputs Machine i o i k...... Combinational logic unit Q D... Q n D n... s Synchronization n signal Delay elements (one per state bit) s... f o f m Outputs State bits Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

A-7 Appendix A: Digital Logic Vending Machine State Transition Q/ A dime is inserted Diagram / = Dispense/Do not dispense merchandise N/ D/ / = Return/Do not return a nickel in change / = Return/Do not return a dime in change N/ A B D Q/ D/ 5 5 Q/ Q/ D/ Principles of Computer Architecture by M. Murdocca and V. Heuring D/ N/ C N/ N = Nickel D = Dime Q = Quarter 999 M. Murdocca and V. Heuring

3.2 Boolean Algebra Boolean algebra is a mathematical system for the manipulation of variables that can have one of two values. In formal logic, these values are true and false. In digital systems, these values are on and off, and, or high and low. Boolean expressions are created by performing operations on Boolean variables. Common Boolean operators include AND, OR, and NOT. 5

3.2 Boolean Algebra A Boolean operator can be completely described using a truth table. The truth table for the Boolean operators AND and OR are shown at the right. The AND operator is also known as a Boolean product. The OR operator is the Boolean sum. 6

3.2 Boolean Algebra The truth table for the Boolean NOT operator is shown at the right. The NOT operation is most often designated by an overbar. It is sometimes indicated by a prime mark ( ) or an elbow ( ). 7

3.2 Boolean Algebra A Boolean function has: At least one Boolean variable, At least one Boolean operator, and At least one input from the set {,}. It produces an output that is also a member of the set {,}. Now you know why the binary numbering system is so handy in digital systems. 8

The truth table for the Boolean function: 3.2 Boolean Algebra is shown at the right. To make evaluation of the Boolean function easier, the truth table contains extra (shaded) columns to hold evaluations of subparts of the function. 9

As with common arithmetic, Boolean operations have rules of precedence. The NOT operator has highest priority, followed by AND and then OR. 3.2 Boolean Algebra This is how we chose the (shaded) function subparts in our table.

3.2 Boolean Algebra Digital computers contain circuits that implement Boolean functions. The simpler that we can make a Boolean function, the smaller the circuit that will result. Simpler circuits are cheaper to build, consume less power, and run faster than complex circuits. With this in mind, we always want to reduce our Boolean functions to their simplest form. There are a number of Boolean identities that help us to do this.

3.2 Boolean Algebra Most Boolean identities have an AND (product) form as well as an OR (sum) form. We give our identities using both forms. Our first group is rather intuitive: 2

3.2 Boolean Algebra Our second group of Boolean identities should be familiar to you from your study of algebra: 3

3.2 Boolean Algebra Our last group of Boolean identities are perhaps the most useful. If you have studied set theory or formal logic, these laws are also familiar to you. 4

3.2 Boolean Algebra We can use Boolean identities to simplify: as follows: 5

3.2 Boolean Algebra Sometimes it is more economical to build a circuit using the complement of a function (and complementing its result) than it is to implement the function directly. DeMorgan s law provides an easy way of finding the complement of a Boolean function. Recall DeMorgan s law states: 6

3.2 Boolean Algebra DeMorgan s law can be extended to any number of variables. Replace each variable by its complement and change all ANDs to ORs and all ORs to ANDs. Thus, we find the the complement of: is: 7

3.2 Boolean Algebra Through our exercises in simplifying Boolean expressions, we see that there are numerous ways of stating the same Boolean expression. These synonymous forms are logically equivalent. Logically equivalent expressions have identical truth tables. In order to eliminate as much confusion as possible, designers express Boolean functions in standardized or canonical form. 8

3.2 Boolean Algebra There are two canonical forms for Boolean expressions: sum-of-products and product-of-sums. Recall the Boolean product is the AND operation and the Boolean sum is the OR operation. In the sum-of-products form, ANDed variables are ORed together. For example: In the product-of-sums form, ORed variables are ANDed together: For example: 9

3.2 Boolean Algebra It is easy to convert a function to sum-of-products form using its truth table. We are interested in the values of the variables that make the function true (=). Using the truth table, we list the values of the variables that result in a true function value. Each group of variables is then ORed together. 2

3.2 Boolean Algebra The sum-of-products form for our function is: We note that this function is not in simplest terms. Our aim is only to rewrite our function in canonical sum-of-products form. 2

3.3 Logic Gates We have looked at Boolean functions in abstract terms. In this section, we see that Boolean functions are implemented in digital computer circuits called gates. A gate is an electronic device that produces a result based on two or more input values. In reality, gates consist of one to six transistors, but digital designers think of them as a single unit. Integrated circuits contain collections of gates suited to a particular purpose. 22

3.3 Logic Gates The three simplest gates are the AND, OR, and NOT gates. They correspond directly to their respective Boolean operations, as you can see by their truth tables. 23

3.3 Logic Gates Another very useful gate is the exclusive OR (XOR) gate. The output of the XOR operation is true only when the values of the inputs differ. Note the special symbol for the XOR operation. 24

3.3 Logic Gates NAND and NOR are two very important gates. Their symbols and truth tables are shown at the right. 25

3.3 Logic Gates NAND and NOR are known as universal gates because they are inexpensive to manufacture and any Boolean function can be constructed using only NAND or only NOR gates. 26

3.3 Logic Gates Gates can have multiple inputs and more than one output. A second output can be provided for the complement of the operation. We ll see more of this later. 27

The main thing to remember is that combinations of gates implement Boolean functions. The circuit below implements the Boolean function: 3.3 Logic Gates We simplify our Boolean expressions so that we can create simpler circuits. 28

A-8 Appendix A: Digital Logic Sum-of-Products Form: The Majority Function The SOP form for the 3-input majority function is: M = ABC + ABC + ABC + ABC = m3 + m5 + m6 + m7 = Σ (3, 5, 6, 7). Each of the 2 n terms are called minterms, ranging from to 2 n -. Note relationship between minterm number and boolean value. Minterm Index 2 3 4 5 6 7 A B C F -side -side A balance tips to the left or right depending on whether there are more s or s. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

A-9 Appendix A: Digital Logic AND-OR Implementation of Majority A B C Gate count is 8, gate input count is 9. A B C A B C F A B C A B C Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

Sum of Products (a.k.a. disjunctive normal form) OR (i.e., sum) together rows with output AND (i.e., product) of variables represents each row e.g., in row 3 when x =AND x 2 =AND x 3 = or when x x 2 x 3 = MAJ3(x,x 2,x 3 )=x x 2 x 3 +x x 2 x 3 +x x 2 x 3 +x x 2 x 3 = m(3, 5, 6, 7) x x 2 x 3 MAJ3 2 3 4 5 6 7

Product of Sums (a.k.a. conjunctive normal form) AND (i.e., product) of rows with output OR (i.e., sum) of variables represents negation of each row e.g., NOT in row 2 when x =OR x 2 =OR x 3 = or when x + x 2 + x 3 = MAJ3(x,x 2,x 3 )=(x +x 2 +x 3 )(x +x 2 +x 3 )(x +x 2 +x 3 )(x +x 2 +x 3 ) = M(,, 2, 4) x x 2 x 3 MAJ3 2 3 4 5 6 7 2

A-2 Appendix A: Digital Logic OR-AND Implementation of Majority A B C A + B + C A + B + C F A + B + C A + B + C Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

Equivalences Every Boolean function can be written as a truth table Every truth table can be written as a Boolean formula (SOP or POS) Every Boolean formula can be converted into a combinational circuit Every combinational circuit is a Boolean function Later you might learn other equivalencies: finite automata regular expressions computable functions programs 3

Universality Every Boolean function can be written as a Boolean formula using AND, OR and NOT operators. Every Boolean function can be implemented as a combinational circuit using AND, OR and NOT gates. Since AND, OR and NOT gates can be constructed from NAND gates, NAND gates are universal. 4

A-7 Appendix A: Digital Logic All-NAND Implementation of OR NAND alone implements all other Boolean logic gates. A B A + B A B A + B Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

A-6 Appendix A: Digital Logic DeMorgan s Theorem A B = = A B A + B A + B A B DeMorgan s theorem: A + B = A + B = A B A B F = A + B A B F = A B Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

SEMICONDUCTORS, TRANSISTORS & GATES

How do we make gates??? UMBC, CMSC33, Richard Chang <chang@umbc.edu>

A-5 Appendix A: Digital Logic A Truth Table Developed in 854 by George Boole. Further developed by Claude Shannon (Bell Labs). Outputs are computed for all possible input combinations (how many input combinations are there?) Consider a room with two light switches. How must they work? GND Inputs Output Hot Light Z A B Z Switch A Switch B Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring

Electrically Operated Switch Example: a relay source: http://www.howstuffworks.com/relay.htm UMBC, CMSC33, Richard Chang <chang@umbc.edu>

Semiconductors Electrical properties of silicon Doping: adding impurities to silicon Diodes and the P-N junction Field-effect transistors UMBC, CMSC33, Richard Chang <chang@umbc.edu>

Los Alamos National Laboratory's Chemistry Division Presents Periodic Table of the Elements Period Group IA A 8 IIIA 8A V H.8 2 IIA 2A 3 IIIA 3A 4 IVA 4A 5 VA 5A 6 VIA 6A 7 VIIA 7A 2 He 4.3 2 3 Li 6.94 4 Be 9.2 5 B.8 6 C 2. 7 N 4. 8 O 6. 9 F 9. Ne 2.8 3 Na 22.99 2 Mg 24.3 3 IIIB 3B 4 IVB 4B 5 VB 5B 6 VIB 6B 7 VIIB 7B 8 9 IB B 2 IIB 2B 3 Al 26.98 4 Si 28.9 5 P 3.97 6 S 32.7 7 Cl 35.45 8 Ar 39.95 ------- VIII ----- -- ------- 8 ------- 4 9 K 39. 2 Ca 4.8 2 Sc 44.96 22 Ti 47.88 23 V 5.94 24 Cr 52. 25 Mn 54.94 26 Fe 55.85 27 Co 58.47 28 Ni 58.69 29 Cu 63.55 3 Zn 65.39 3 Ga 69.72 32 Ge 72.59 33 As 74.92 34 Se 78.96 35 Br 79.9 36 Kr 83.8 5 37 Rb 85.47 38 Sr 87.62 39 Y 88.9 4 Zr 9.22 4 Nb 92.9 42 Mo 95.94 43 Tc (98) 44 Ru. 45 Rh 2.9 46 Pd 6.4 47 Ag 7.9 48 Cd 2.4 49 In 4.8 5 Sn 8.7 5 Sb 2.8 52 Te 27.6 53 I 26.9 54 Xe 3.3 6 55 Cs 32.9 56 Ba 37.3 57 * La 38.9 72 Hf 78.5 73 Ta 8.9 74 W 83.9 75 Re 86.2 76 Os 9.2 77 Ir 9.2 78 Pt 95. 79 Au 97. 8 Hg 2.5 8 Tl 24.4 82 Pb 27.2 83 Bi 29. 84 Po (2) 85 At (2) 86 Rn (222) 7 87 Fr (223) 88 Ra (226) 89 ~ Ac (227) 4 Rf (257) 5 Db (26) 6 Sg (263) 7 Bh (262) 8 Hs (265) 9 Mt (266) --- () --- () 2 --- () 4 --- () 6 --- () 8 --- () Lanthanide Series* 58 Ce 4. 59 Pr 4.9 6 Nd 44.2 6 Pm (47) 62 Sm 5.4 63 Eu 52. 64 Gd 57.3 65 Tb 58.9 66 Dy 62.5 67 Ho 64.9 68 Er 67.3 69 Tm 68.9 7 Yb 73. 7 Lu 75. Actinide Series~ 9 Th 232. 9 Pa (23) 92 U (238) 93 Np (237) 94 Pu (242) 95 Am (243) 96 Cm (247) 97 Bk (247) 98 Cf (249) 99 Es (254) Fm (253) Md (256) 2 No (254) 3 Lr (257)

An Inverter using MOSFET CMOS = complementary metal oxide semiconductor P-type transistor conducts when gate is low N-type transistor conducts when gate is high +5v p-type MOSFET +5v +5v A z A z A z n-type MOSFET GND GND GND UMBC, CMSC33, Richard Chang <chang@umbc.edu>

+5v +5v NAND GATE A B z A z A z B B GND +5v GND +5v +5v A z A z A z B B B GND GND GND

+5v +5v NOR GATE A B z A A B z B z GND GND +5v +5v +5v A A A B z B z B z GND GND GND

CMOS Logic vs Bipolar Logic MOSFET transistors are easier to miniaturize CMOS logic has lower current drain CMOS logic is easier to manufacture UMBC, CMSC33, Richard Chang <chang@umbc.edu>

References Materials on semiconductors, PN junction and transistors taken from the HyperPhysics web site: <http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html> UMBC, CMSC33, Richard Chang <chang@umbc.edu>