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

Slides:



Advertisements
Similar presentations
DAT2343 Basic Logic Gates © Alan T. Pinck / Algonquin College; 2003.
Advertisements

CT455: Computer Organization Logic gate
Digital Electronics Lecture 2 Logic Gates. Lecture 2 outline Announcement:
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
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.
9/19/06 Hofstra University – Overview of Computer Science, CSC005 1 Chapter 4 Gates and Circuits.
1 Boolean Algebra & Logic Design. 2 Developed by George Boole in the 1850s Mathematical theory of logic. Shannon was the first to use Boolean Algebra.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Chapter 1 The Big Picture. QUIZ 2 5 Explain the abstractions we normally apply when using the following systems: DVD player Registering for classes on.
3. DIGITAL ELECTRONICS..
22C:19 Discrete Math Boolean Algebra & Digital Logic Fall 2010 Sukumar Ghosh.
1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
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.
Boolean Logic By: Arthur Brooks February 25, 2003 Think, Speak, and Write Computer Science.
CS1Q Computer Systems Lecture 5 Simon Gay. Lecture 5CS1Q Computer Systems - Simon Gay2 Where we are Global computing: the Internet Networks and distributed.
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
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.
CSC 107 – Programming For Science. Follow-Up From Last Lecture.
CS1Q Computer Systems Lecture 8
CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
CSC 107 – Programming For Science. Announcements.
D75P 34R - HNC Computer Architecture Week 6 Boolean Logic © C Nyssen/Aberdeen College 2004 All images © C Nyssen /Aberdeen College unless otherwise stated.
Physics 343 Advanced Electronics Engineering 343 Digital Systems Electronics Courses.
CSC 107 – Programming For Science. George Boole  Mathematician from English middle-class  Lived from 1815 – 1864  Started work at age 16 as a teaching.
CSC Intro. to Computing Lecture 5: Gates, Circuits, & Transistors.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Some basic electronics and truth tables Some material on truth tables can be found in Chapter 3 of Digital Principles (Tokheim)
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
1 Ethics of Computing MONT 113G, Spring 2012 Session 1 Digital Circuits, binary Numbers Course webpage:
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
CSC Intro. to Computing Lecture 7: Circuits & Boolean Properties.
Logic Design EE-2121 Manesh T. Digital Systems  Introduction  Binary Quantities and Variables  Logic Gates  Boolean Algebra  Combinational Logic.
Logic Simplification-Using Boolean Laws Logic Design Laboratory EE 2121 Lectures By Manesh T EE2121-In Charge
Binary Logic Derrington KCL CPD/SKE Binary We’ve seen how data of all different sorts and kinds can be represented as binary bits… 0s and 1s 1 is.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
Boolean Algebra. LO:  Understand why Boolean algebra is used  Understand basic Boolean algebra notation  Understand why Boolean algebra is used  Understand.
Unit 1 Logical operators.
Basics of Logic gates - Part 1
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Chapter 3 - Binary Numbering System
Morgan Kaufmann Publishers
Component 1 Logical operators.
Logic Gates and Boolean Algebra
CSIS-110 Introduction to Computer Science
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Chapter 4 Gates and Circuits.
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Computer Science 210 Computer Organization
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Number Systems Decimal (base 10) { }
For OCR GCSE Computing Unit 1 - Theory
Logic Gates.
Digital Logic.
Boolean Logic Boolean Logic is considered to be the basic of digital electronics. We know that a computer’s most basic operation is based on digital electronics.
Logic Gates.
GCSE Computer Science – Logic Gates & Boolean Expressions
ECB2212-Digital Electronics Boolean algebra
Logic Gates.
Chapter 4 Gates and Circuits.
Truth tables Mrs. Palmer.
Copyright © Cengage Learning. All rights reserved.
What are Logic Gates?.
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 and addition in other bases Homework answers available on web  Homework #2 will be next week CSC tutors are now available  Hours posted outside Wehle 206 & 208

Homework Review Results were (generally) very good  Most mistakes came from miscopying numbers or addition mistakes  Very few mistakes were due to errors in algorithm Brief review includes most common error(s)

Homework Problem #7 Convert 14D 16 into octal  Don’t know how to convert hex to octal directly  (Harder) Solution: Convert to decimal first 14D 16 =

Convert 14D 16 to Octal (Harder) Solution: Convert to decimal first 14D 16 = 13 * 16 0 = 13 * 1 = 13 4 * 16 1 = 4 * 16 = 64 1 * 16 2 = 1 * 256 =

Convert 14D 16 to Octal (Harder) Solution: Convert to decimal first 14D 16 = = 515 8

Convert to Hexadecimal (Easier) Method: Convert to binary first =

Convert to Hexadecimal (Easier) Method: Convert to binary first = Convert 5 Convert 1

Convert to Hexadecimal (Easier) Method: Convert to binary first = 2 = = 1 * 2 0 = 1 * 1 = 1 0 * 2 1 = 0 * 2 = 0 1 * 2 2 = 1 * 4 = 4 1 * 2 3 = 1 * 8 =

Convert to Hexadecimal (Easier) Method: Convert to binary first = 2 = = 1 * 2 0 = 1 * 1 = 1 0 * 2 1 = 0 * 2 = 0 1 * 2 2 = 1 * 4 = 4 1 * 2 3 = 1 * 8 = = D D

Convert to Hexadecimal (Easier) Method: Convert to binary first = 2 = = 0 * 2 0 = 0 * 1 = 0 0 * 2 1 = 0 * 2 = 0 1 * 2 2 = 1 * 4 = 4 0 * 2 3 = 0 * 8 = = D

Convert to Hexadecimal (Easier) Method: Convert to binary first = 2 = = 1 * 2 0 = 1 * 1 = = D

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 Reached pinnacle when appointed a Professor  Published Mathematical Analysis of Logic in 1847

Mathematical Analysis of Logic Boole’s book proposed new logical system  World consisted of only two values Derived other numbers from combinations of these  Devised addition, subtraction, and multiplication rules  Basis for several areas of academic research  World thought work was of little importance Not until 1963 did someone find a use for it…

Boolean System of Logic Also called “Boolean algebra” Initial world consists of two values  Think of them as “true” and “false” Also defines several basic Boolean operations  You have been using some of these for years, however  Work exactly as you have been using them

Truth Table Normal way we present Boolean functions Each table include all possible inputs…  Made easier since we only have true & false …and shows each possible result Not as complicated as it sounds  Actually, not very complicated at all!

Boolean Negation: NOT NOT is simplest operation  Returns the negation of the input True when a is false; false when a is true  Written as false true

Boolean Operation: OR OR takes two values as inputs  Written as  Returns true when either value is true True when either a OR b are true; false otherwise false true false true

Boolean Operation: AND AND also takes two inputs  Written as  Returns true when both values are true True when a AND b are true; false otherwise false true false true

Boolean Operation: XOR First slightly unfamiliar idea: XOR  XOR computes “exclusive or”  Written as  True when a or b, but not both, is true false true false true

Boolean Operation: NAND NAND computes NEGATIVE AND  Written as Combines notation for AND & NOT  Returns true when either input is not true True if a OR b are false; false otherwise false true false true

Boolean Operation: NOR Last operation is NEGATIVE OR  Written as The negation (NOT) of an OR operation  Returns true when both inputs are not true True if a AND b are false; false otherwise false true false true

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

Boolean Logic in Computers Computers work best with concrete terms  For more on truth, see religious studies or philosophy Use “1” rather than true & “0” for false

Extended Boole’s Algebra Algebra includes ability to combine inputs and operations functions  f(x, y, z) = x 2 + y + z  f(2, 4, 1)= = = 14 This is true for Boole’s algebra, too  Computers do more than negate bits  We still use truth tables for this work

Circuits Combines results of multiple operations List result of each operation in truth table  Compute each new operation step-by-step Consider combining two NOT operations  Written 0 1

Even More Complex Circuits Compute  Negate a, then compute result AND b

Really Complex Circuits Determine truth table for

More Complex Circuits Consider

Creating Truth Tables Start truth table by listing all possible inputs  For 1 input, 2 possible values exist  For 2 inputs, 4 possible combinations  For 3 inputs, 8 combinations  For 4 inputs, 16 combinations  For 5 inputs, 32 combinations  For 10 inputs, 1024 combinations  For n inputs, 2 n combinations

Creating Truth Tables There is a secret to making the inputs  1 st input – Alternate one 0 and one 1  2 nd input – Repeat two 0s then two 1s  3 rd input – Repeat four 0s then four 1s  4 th input – Repeat eight 0s then eight 1s Start with row of all 0s Stop when you reach a row with all 1s

Creating Truth Table Keep going until we reach row with only 1s

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 Gate-centric way of writing Boolean operations  Similar to equations from before, but not as math-centric Highlights the electronic nature of gates  Shows values coming into and out of each gate as a wire  Label the wires for circuit inputs

Logic Diagrams a a b a b

a b a b a b

Drawing Logic Diagrams Often use results from one gate as input into another gate  E.g., use result from in Show this by connecting wire from first gate’s output to second gate’s input b c a

a b c Drawing Logic Diagrams Sometimes we have one value used as input for more than 1 gate  Show this by drawing a “splitter”  E.g.

For next lecture Study for the quiz on number systems on Thursday Finish reading section 4 Be ready to discuss  Algebraic Properties of Boolean Logic