Learning Outcomes. Computer Systems - Architecture Lecture 4 - Boolean Logic. What is Logic? Boolean Logic 10/28/2010



Similar documents
CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Words Symbols Diagram. abcde. a + b + c + d + e

Algebra Review. How well do you remember your algebra?

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. Date: Friday 16 th May Time: 14:00 16:00

Lec 2: Gates and Logic

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

Reasoning to Solve Equations and Inequalities

Regular Sets and Expressions

Binary Representation of Numbers Autar Kaw

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Bayesian Updating with Continuous Priors Class 13, 18.05, Spring 2014 Jeremy Orloff and Jonathan Bloom

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Multiplication and Division - Left to Right. Addition and Subtraction - Left to Right.

Or more simply put, when adding or subtracting quantities, their uncertainties add.

5.6 POSITIVE INTEGRAL EXPONENTS

EQUATIONS OF LINES AND PLANES

Operations with Polynomials

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Homework 3 Solutions

One Minute To Learn Programming: Finite Automata

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Understanding Logic Design

Experiment 6: Friction

COMPLEX FRACTIONS. section. Simplifying Complex Fractions

LECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.

Vector differentiation. Chapters 6, 7

5 a LAN 6 a gateway 7 a modem

1 Fractions from an advanced point of view

Section 5-4 Trigonometric Functions

Integration by Substitution

Ratio and Proportion

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Online EFFECTIVE AS OF JANUARY 2013

Exponential and Logarithmic Functions

SPECIAL PRODUCTS AND FACTORIZATION

Lesson 2.1 Inductive Reasoning

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

GENERAL APPLICATION FOR FARM CLASSIFICATION

2 DIODE CLIPPING and CLAMPING CIRCUITS

CS 316: Gates and Logic

Factoring Polynomials

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

MATH PLACEMENT REVIEW GUIDE

1.2 The Integers and Rational Numbers

0.1 Basic Set Theory and Interval Notation

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

Angles 2.1. Exercise Find the size of the lettered angles. Give reasons for your answers. a) b) c) Example

6.2 Volumes of Revolution: The Disk Method

1 Boolean Logic. Such simple things, And we make of them something so complex it defeats us, Almost. John Ashbery (b. 1927), American poet

Answer, Key Homework 10 David McIntyre 1

RTL Power Optimization with Gate-level Accuracy

Unit 6: Exponents and Radicals

1. Definition, Basic concepts, Types 2. Addition and Subtraction of Matrices 3. Scalar Multiplication 4. Assignment and answer key 5.

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

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

NQF Level: 2 US No: 7480

Recognition Scheme Forensic Science Content Within Educational Programmes

Hillsborough Township Public Schools Mathematics Department Computer Programming 1

Review guide for the final exam in Math 233

MATH 150 HOMEWORK 4 SOLUTIONS

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

Quick Reference Guide: One-time Account Update

MULTIPLYING OUT & FACTORING

Rotating DC Motors Part II

4.5 Signal Flow Graphs

3 The Utility Maximization Problem

4.11 Inner Product Spaces

e.g. f(x) = x domain x 0 (cannot find the square root of negative values)

1. In the Bohr model, compare the magnitudes of the electron s kinetic and potential energies in orbit. What does this imply?

Brillouin Zones. Physics 3P41 Chris Wiebe

M I N I S T R Y O F E D U C A T I O N

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

SOLVING EQUATIONS BY FACTORING

End of term: TEST A. Year 4. Name Class Date. Complete the missing numbers in the sequences below.

Firm Objectives. The Theory of the Firm II. Cost Minimization Mathematical Approach. First order conditions. Cost Minimization Graphical Approach

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

The remaining two sides of the right triangle are called the legs of the right triangle.

BUSINESS OWNERS PACKAGE INSURANCE APPLICATION

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

SINCLAIR COMMUNITY COLLEGE DAYTON, OHIO DEPARTMENT SYLLABUS FOR COURSE IN MAT COLLEGE ALGEBRA (4 SEMESTER HOURS)

Data Compression. Lossless And Lossy Compression

Helicopter Theme and Variations

Section 7-4 Translation of Axes

, and the number of electrons is -19. e e C. The negatively charged electrons move in the direction opposite to the conventional current flow.

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

Vectors and dyadics. Chapter 2. Summary. 2.1 Examples of scalars, vectors, and dyadics

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

Pure C4. Revision Notes

9 CONTINUOUS DISTRIBUTIONS

Graphs on Logarithmic and Semilogarithmic Paper

MA Lesson 16 Notes Summer 2016 Properties of Logarithms. Remember: A logarithm is an exponent! It behaves like an exponent!

AREA OF A SURFACE OF REVOLUTION

Object Semantics Lecture 2

Transcription:

/28/2 Lerning Outcomes At the end of this lecture you should: Computer Systems - Architecture Lecture 4 - Boolen Logic Eddie Edwrds eedwrds@doc.ic.c.uk http://www.doc.ic.c.uk/~eedwrds/compsys (Hevily sed on notes y Andrew Dvison nd In Hrries) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.) understnd how logic reltes to computing prolems e le to represent Boolen logic prolems s: Truth tles Logic circuits Boolen lger e le to produce circuits for the hlf dder nd full dder hve feeling for how electronic circuits cn e joined together to crete numer mnipultors (simple computers???) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.2) Wht is Logic? Dictionry definitions (dictionry.com - reduced!) reson or sound judgement system of principles of resoning the science tht investigtes the principles governing correct or relile inference Brnch of philosophy Principles of inference Ancient civiliztions (Indi the Rigved, Chin Gongsun Long 325 BC) Greek Aristotle (Syllogistic logic) Modern: John Sturt Mill The science of resoning, Frege, Russell, Gödel... You use logic ll the time in your everydy life Computer Systems - Architecture (EEdwrds) Boolen Logic (4.3) Boolen Logic Nmed fter George Boole Provides system of logicl opertions Rules for comining opertions Descries their ppliction to inry numers or? TRUE or FALSE? YES OR NO? Computer Systems - Architecture (EEdwrds) Boolen Logic (4.4)

/28/2 Simple Emple If it is rining then I will tke n umrell It is rining cn e TRUE or FALSE I will tke n umrell - cn e TRUE OR FALSE The truth of tke n umrell depends on the truth of rining Cn e represented in the form of truth tle: Rining Flse True Umrell Flse True Cn e used to mke decision (i.e. inference): (tke umrell) = (rining) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.5) Emple 2 If it is rining or the wether forecst is d then I tke n umrell Truth tle: Rining Bd forecst umrell Flse Flse Flse Flse True True True Flse True True True True (tke umrell) = ((rining) OR (d forecst)) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.6) Emple 3 Digitl Logic If it is rining nd I hve no cr then I will tke n umrell Truth tle: Rining No Cr Umrell Flse Flse Flse Flse True Flse True Flse Flse True True True (tke umrell) = ((rining) AND (NOT cr)) Computers mke decisions using logic Bsic logic opertions Also NOT AND OR Eclusive OR (XOR) NOT AND (NAND) NOT OR (NOR) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.7) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.8) 2

/28/2 3 Computer Systems - Architecture (EEdwrds) Boolen Logic (4.9) Digitl Logic Computers operte electroniclly using Logic Gtes One or more inputs One output Input nd output re inry digits ( or ) = FALSE = TRUE Electronic circuits re esily connected together to perform more comple functions, from these sic uilding locks of computers Computer Systems - Architecture (EEdwrds) Boolen Logic (4.) Logic Gtes NOT gte: AND gte: Computer Systems - Architecture (EEdwrds) Boolen Logic (4.) Wht is the truth tle for the NOR gte? A B C D E Computer Systems - Architecture (EEdwrds) Boolen Logic (4.2) Logic Gtes OR gte: XOR gte:

/28/2 How mny sic logic gtes re required Answer NOT AND A (XOR) = (NOT ) AND (NOT ) OR ( OR ) B (XOR) = OR (( AND NOT ) AND ) OR C (XOR) = NOT((NOT AND NOT ) OR ( AND )) XOR cn e mde up of NOT, AND nd OR gtes Drw the circuit D (XOR) = ( AND NOT ) OR (NOT AND ) E (XOR) = ( OR ) AND NOT ( AND ) Wht is the corresponding logic eqution? IN FACT C, D or E re correct nswers, ut D,E more concise Computer Systems - Architecture (EEdwrds) Boolen Logic (4.3) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.4) Summry Prcticl digitl circuits Bsic logic gtes AND, OR nd NOT re enough Useful to hve others - XOR, NAND etc. Cn hve more comple gtes (e.g, multiple inputs) 3-input AND gte NAND gte (AND followed y NOT) 74 dul in-line pckge Computer Systems - Architecture (EEdwrds) Boolen Logic (4.5) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.6) 4

/28/2 Boolen lger - nottion Boolen lger - rules Infuritingly, there is no single greed representtion for the logicl opertors in Boolen lger: A AND B º A B º A Ù B º A & B º AB A OR B º A + B º A Ú B º A B A XOR B º A Å B NOT A º A º Ø A º Ā (with r) º A' We will use A B, A + B, A' Computer Systems - Architecture (EEdwrds) Boolen Logic (4.7) There re mny rules tht cn e used for lgeric mnipultion Negtion: (A')' = A A A' = Associtive: (A B) C = A (B C) (A+B)+C = A+(B+C) Commuttive: A B = B A A+B = B+A A+A' = Distriutive: A (B+C) = A B + A C A+(B C) = (A+B) (A+C) Note the precedence Computer Systems - Architecture (EEdwrds) Boolen Logic (4.8) Boolen lger - rules Boolen Alger de Morgn s rules Single vriles: A A = A A+A = A Simplifiction rules with nd : A = A = A A+ = A A+ = (A + B)' = A' B' (A B)' = A' + B' s efore, A nd B cn e ny Boolen epression Cn generlise to n Boolen vriles: (A + B + C + D +...)' = A' B' C' D'... (A B C D...)' = A ' + B' + C' + D' +... Computer Systems - Architecture (EEdwrds) Boolen Logic (4.9) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.2) 5

/28/2 Boolen lger rules for XOR Addition using logic gtes A Å B = A B' + A' B Complement Lw for XOR: (AÅB)' = AÅB' = A'ÅB Suppose we wnt to dd two one-it inputs? Wht is the truth tle for The sum? Any it tht might crry over? Eclusive NOR (NOT XOR) sometimes clled n equivlence gte why? Computer Systems - Architecture (EEdwrds) Boolen Logic (4.2) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.22) Addition using logic circuits The hlf-dder In the following circuit: Upper o is: A. AND B. OR C. NOT D. XOR E. NOR Lower o is: A. AND B. OR C. NOT D. XOR E. NOR Computer Systems - Architecture (EEdwrds) Boolen Logic (4.23) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.24) 6

/28/2 The full dder The full-dder For full dder, we need nother input, the crry it from the net less significnt it. Wht is the logic circuit for the full dder? Computer Systems - Architecture (EEdwrds) Boolen Logic (4.25) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.26) The full dder - redrwn Lerning Outcomes You should now: understnd how logic reltes to computing prolems Effectively two hlf-dders plus n OR gte e le to represent Boolen logic prolems s: Truth tles Logic circuits Boolen lger e le to produce circuits for the hlf dder nd full dder hve feeling for how electronic circuits cn e joined together to crete numer mnipultors (simple computers???) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.27) Computer Systems - Architecture (EEdwrds) Boolen Logic (4.28) 7

/28/2 This lecture - feedck The pce of the lecture ws: A. much too fst B. too fst C. out right D. too slow E. much too slow The lerning ojectives were met: A. Fully B. Mostly C. Prtilly D. Slightly E. Not t ll Computer Systems - Architecture (EEdwrds) Boolen Logic (4.29) 8