CSC 110 - Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.

Slides:



Advertisements
Similar presentations
Chapter 4 Gates and Circuits.
Advertisements

ENGIN112 L7: More Logic Functions September 17, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 7 More Logic Functions: NAND, NOR,
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Chapter 4 Gates and Circuits.
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
Chapter 4 Gates and Circuits.
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 4 Gates and Circuits.
Lecture 3. Boolean Algebra, Logic Gates
22C:19 Discrete Math Boolean Algebra & Digital Logic Fall 2010 Sukumar Ghosh.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Chapter 4 Gates and Circuits. 4–2 Chapter Goals Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors.
Chapter 4 Gates and Circuits.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Boolean Algebra and Digital Logic Chapter 3. Chapter 3 Objectives  Understand the relationship between Boolean logic and digital computer circuits. 
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Chapter 4 Gates and Circuits.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Lecture 17: Digital Design Today’s topic –Intro to Boolean functions Reminders –HW 4 due Wednesday 10/8/2014 (extended) –HW 5 due Wednesday 10/15/2014.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
CSC 107 – Programming For Science. Follow-Up From Last Lecture.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
The Digital Logic Level
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
1 DIGITAL ELECTRONICS. 2 OVERVIEW –electronic circuits capable of carrying out logical (boolean) and arithmetic operations on information stored as binary.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
CSC 107 – Programming For Science. Announcements.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
CSC 107 – Programming For Science. George Boole  Mathematician from English middle-class  Lived from 1815 – 1864  Started work at age 16 as a teaching.
IT253: Computer Organization Lecture 7: Logic and Gates: Digital Design Tonga Institute of Higher Education.
CSC Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.
CSC Intro. to Computing Lecture 7: Circuits & Boolean Properties.
Chapter 4 Fundamentals of Computer Logic 1 Chapter 4: Fundamental of Computer Logic - IE337.
Appendix B: Digital Logic
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
Logic Gates and Boolean Algebra Introduction to Logic II.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Dr. ClincyLecture Slide 1 CS6020- Chapter 3 (3A and ) Dr. Clincy Professor of CS First Exam - Tuesday, September 6th Coverage: All subjects up to.
Week 1: Introduction and Logic gates IT3002 – Computer Architecture
Digital Logic.
Morgan Kaufmann Publishers
Dr. Clincy Professor of CS
Chapter 4 Gates and Circuits.
CS105 Introduction to Computer Concepts GATES and CIRCUITS
CSE 311 Foundations of Computing I
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Dr. Clincy Professor of CS
Week 7: Gates and Circuits: PART II
Dr. Clincy Professor of CS
CS Chapter 3 (3A and ) Part 3 of 8
Logic Gates.
CS Chapter 3 (3A and ) – Part 2 of 5
GCSE Computer Science – Logic Gates & Boolean Expressions
Digital Logic.
ECB2212-Digital Electronics Boolean algebra
Dr. Clincy Professor of CS
Chapter 4 Gates and Circuits.
Introductory Concepts
Copyright © Cengage Learning. All rights reserved.
Presentation transcript:

CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits

Announcements Quiz at end of class on Thursday  Covers converting numbers between bases Homework assignment handed out next Tuesday  Will include material from this week’s lectures CSC tutors are now available  Hours posted outside Wehle 206 & 208

George Boole Mathematician from English middle-class  Lived from 1815 – 1864  Started work at age 16 as a teaching assistant Held two assistantships to support family Later opened his own school Ultimately appointed a Prof. at Queen’s College  Published Mathematical Analysis of Logic in 1847

Mathematical Analysis of Logic Boole’s book used algebraic analysis to creating a logical system  Initially limited world to only “1” and “0” All other values were defined from these  Devised rules of addition, subtraction, and multiplication  Basis for modern field of symbolic logic  World thought work was of little importance

Algebra Review In algebra, define variables & functions  Variables used as placeholder for actual value E.g., 3x = 154y = 43a + 6b = 12  Functions map input values to output values E.g., f(x) = 3xg(z) = z 2 + 3z + 2  We can define new variables using functions E.g., y = f(x)h = f(g(y))

Boolean Algebra Name given to Boole’s system of logic System consists of two values  Think of them as “true” and “false” Logical functions take 1 or more input(s)  But still return only one of the two values You already know basic boolean functions  Work exactly as you would expect

Truth Table Normal way to evaluate Boolean functions Each table covers all function inputs…  …but Boolean algebra only has 2 values  A function with n input variables, has how many different possible inputs? Not nearly as complicated as it sounds

Boolean Function: NOT NOT is simplest function  Accepts a single input  Outputs if the input is NOT true NOT returns “the negation of the input”  Written as E.g., x is true if a is NOT true

Boolean Function: OR OR takes two inputs  Written as  Returns true if either input is true x will be true if either a OR b are true

Boolean Function: AND AND also takes two inputs  Written as  Returns true if both inputs are true x will be true if a AND b are true

Boolean Function: XOR First slightly unfamiliar function XOR  XOR performs “exclusive or” on two inputs  Written as x will be true if either a or b is true, but not both

Boolean Function: NAND NAND computes NEGATIVE AND  Written as Combines notation for AND & NOT  Returns true if either input is not true x will be false if both a AND b are true

Boolean Function: NOR Last function is NEGATIVE OR  Written as Shown as the negation (NOT) of the OR result  Returns true if both inputs are not true x will be false if either a OR b are true

George Boole: 1World: 0 Turns out Boolean algebra is VITAL  Basis for nearly all computer hardware  “Last useful thing done by anyone claimed by computer scientists” -- said by former colleague of mine (he is a hardware engineer)

Boolean Logic in Computers Use “1” and “0”, not “true” and “false” True  1 False  0  Changes terminology, but not results  For XOR:

Gate Piece of hardware which combines electrical signal input(s) to generate an output signal  Computer signals range from 0 – 5 volts 0 – 2 volts is “low” --- in “0” state 2 – 5 volts is “high” and in “1” state 6 gates commonly used today:  NOT, OR, AND, XOR, NAND, NOR

Logic Diagrams Another way of writing Boolean functions  Logic diagrams are more gate-centric (rather than the math-centric equations from before) Highlight the electronic nature of gates  Draws function inputs and outputs as wires  Makes drawing combinations of gates (“circuits”) much easier

Logic Diagrams a x a b x a b x

a b x a b x a b x

Extended Boole’s Algebra Algebra includes ability to combine functions  E.g., f(x) = 3x + 5; g(x) = 6x; g(f(x)) = 18x + 30 Functions can also be composed in boolean algebra  Computers do more than negate a single bit!  Truth tables show these results, too!

Extended Truth Tables Consider

Extended Logic Diagrams Combination of gates called a circuit How could we draw ?

Circuit Costs Several ways to analyze circuits  Cost – Additional gates costs money Reducing gates also reduces design complexity This is how programmers tend to evaluate designs  Time – Minimize number of gate levels Each consecutive gate takes time This is how hardware people evaluate designs Cheapest circuit is rarely the fastest

Algebraic Properties of Logic Algebra enables proof of important properties Properties allow proofs of circuit equivalence  E.g. Show two circuits have same output  Allows for faster or cheaper circuits

Algebraic Properties

Improving Circuit Design Use properties to remove unneeded gates Often an iterative process

DeMorgan’s Laws Most laws included in many algebraic systems Two particular to logical systems  Initially stated in present form by Prof. DeMorgan  Useful for evaluating & simplifying circuits  Also good test questions

Adders Two important circuits are the half-adder and full-adder  Half-adder adds two bits and outputs results  Full-adders sums two input bits and a carry bit from another adder and outputs results  Why use a half-adder rather than full-adder?

Half-Adder How will this work?

Full-Adder Why is this so much more complex?

Multiplexers Also known as a mux General purpose circuits which select a single input value to allow to pass through based upon the value of special input signals  Inputs called select signals or select control lines

Multiplexer The multiplexer selects which of the input lines (D0 – D7) to route through to the output F, based upon the value of the control lines (S0, S1, and S2). Figure 4.11 A block diagram of a multiplexer with three select control lines

For next lecture Study! Finish reading section 4 Be ready to discuss  Combinatorial vs. sequential circuits  Latches & how memory is constructed  How gates, circuits, & large chips are made