CSC103 How Computers Work

Similar documents
Boolean Algebra & Digital Logic

mith College Computer Science CSC270 Spring 16 Circuits and Systems Lecture Notes Week 3 Dominique Thiébaut

Intro To Digital Logic

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

mith College Computer Science CSC270 Spring 16 Circuits and Systems Lecture Notes Week 2 Dominique Thiébaut

EEE130 Digital Electronics I Lecture #4

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

Computing via boolean logic. COS 116: 3/8/2011 Sanjeev Arora

CS61c: Representations of Combinational Logic Circuits

Unit 4: Computer as a logic machine

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Computer Organization: Boolean Logic

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

CS187 - Science Gateway Seminar for CS and Math

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

20. Combinational Circuits

CprE 281: Digital Logic

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Binary addition example worked out

CSE 20 DISCRETE MATH. Fall

mith College Computer Science CSC231 - Assembly Week #7 Dominique Thiébaut

CS 226: Digital Logic Design

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

Switches: basic element of physical implementations

E11 Lecture 1: The Big Picture & Digital Systems. Profs. David Money Harris & Sarah Harris Fall 2011

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

Chapter 2: Switching Algebra and Logic Circuits

Unit 2 Boolean Algebra

Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

From Greek philosophers to circuits: An introduction to boolean logic. COS 116, Spring 2011 Sanjeev Arora

Introduction to Computer Engineering ECE 203

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Chapter 1 :: From Zero to One

IST 4 Information and Logic

Lecture 1. Notes. Notes. Notes. Introduction. Introduction digital logic February Bern University of Applied Sciences

Chapter 2: Boolean Algebra and Logic Gates

Logic Design II (17.342) Spring Lecture Outline

COS 140: Foundations of Computer Science

INTRO TO I & CT. (Boolean Algebra and Logic Simplification.) Lecture # By: Department of CS & IT.

MA 3260 Lecture 10 - Boolean Algebras (cont.) Friday, October 19, 2018.

Digital Logic (2) Boolean Algebra

Digital Circuits. 1. Inputs & Outputs are quantized at two levels. 2. Binary arithmetic, only digits are 0 & 1. Position indicates power of 2.

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY LECTURE 8 : WEEK 8 CSC-110-T

From Sequential Circuits to Real Computers

Circuits & Boolean algebra.

cse 311: foundations of computing Spring 2015 Lecture 3: Logic and Boolean algebra

Prime Clocks. Michael Stephen Fiske. 10th GI Conference on Autonomous Systems October 23, AEMEA Institute. San Francisco, California

Bob Brown, CCBC Essex Math 163 College Algebra, Chapter 1 Section 7 COMPLETED 1 Linear, Compound, and Absolute Value Inequalities

Numbers and Arithmetic

CS/COE0447: Computer Organization and Assembly Language

Logic and Boolean algebra

Digital Logic Appendix A

! Chris Diorio. ! Gaetano Borrielo. ! Carl Ebeling. ! Computing is in its infancy

Decidable Languages - relationship with other classes.

CMSC 313 Lecture 16 Announcement: no office hours today. Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

Number System conversions

CS1800 Discrete Structures Final Version A

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Examples of Finite Sequences (finite terms) Examples of Infinite Sequences (infinite terms)

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

Hakim Weatherspoon CS 3410 Computer Science Cornell University

CSE 140, Lecture 2 Combinational Logic CK Cheng CSE Dept. UC San Diego

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

ECE/CS 250 Computer Architecture

CNS 188a Computation Theory and Neural Systems. Monday and Wednesday 1:30-3:00 Moore 080

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Experiment 7: Magnitude comparators

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Floating Point Representation and Digital Logic. Lecture 11 CS301

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

MA204/MA284 : Discrete Mathematics Week 2: Counting with sets; The Principle of Inclusion and Exclusion (PIE) 19 & 21 September 2018

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Implementation of Boolean Logic by Digital Circuits

CS 173 Lecture 2: Propositional Logic

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

1.10 (a) Function of AND, OR, NOT, NAND & NOR Logic gates and their input/output.

Lecture A: Logic Design and Gates

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

Why digital? Overview. Number Systems. Binary to Decimal conversion

Boolean Algebra & Logic Gates. By : Ali Mustafa

CpE358/CS381. Switching Theory and Logical Design. Summer

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra

Philadelphia University Student Name: Student Number:

Logic Design I (17.341) Fall Lecture Outline

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

MAT2345 Discrete Math

Unit 8A Computer Organization. Boolean Logic and Gates

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

Computer Science. Questions for discussion Part II. Computer Science COMPUTER SCIENCE. Section 4.2.

CprE 281: Digital Logic

Transcription:

mith College Computer Science CSC103 How Computers Work Fall 2017 Dominique Thiébaut dthiebaut@smith.edu

Plan for Day 1 Syllabus Overview Some History

Syllabus http://cs.smith.edu < Start here Faculty Dominique Thiébaut (dthiebaut@smith.edu) More Info CSC103 Syllabus Weekly Schedule Piazza < Every Lecture

Japanese animé Steamboy Steampunk 2004 Katsuhiro Otomo

Some History Anthikythera Abacus Difference Engine

Earlier History Anthikythera YouTube video (go to 4 min 12 sec) https://en.wikipedia.org/wiki/antikythera_mechanism#/media/file:nama_machine_d%27anticyth%c3%a8re_1.jpg

Earlier History Abacus Used in Europe, China, Russia First appeared 2700-2300 BC

Earlier History Difference Engine Youtube, Wired video Babbage, 1840 Lady Ada Lovelace (1815-1852) https://simanaitissays.files.wordpress.com/2012/09/difference-engine.jpg

Optical Computing Replace electrons by photons Replace transistors by optical transistors Uncertain future

Recent History DNA Computing Leonard Adleman, 1994, USC Solves the traveling salesman problem. http://sci-zones.silvertonconsult.netdna-cdn.com/blog/wp-content/uploads/2012/03/unknown.jpeg

2 1 3 4 Estimating the number of possible routes

List of Factorials 0! 1 1! 1 2! 2 3! 6 4! 24 5! 120 6! 720 7! 5040 8! 40320 9! 362880 10! 3628800 11! 39916800 12! 479001600 13! 6227020800 14! 87178291200 15! 1307674368000 16! 20922789888000 17! 355687428096000 18! 6402373705728000 19! 121645100408832000 20! 2432902008176640000 21! 51090942171709440000 22! 1124000727777607680000 23! 25852016738884976640000 24! 620448401733239439360000 25! 15511210043330985984000000 26! 403291461126605635584000000 27! 10888869450418352160768000000 28! 304888344611713860501504000000 29! 8841761993739701954543616000000 30! 265252859812191058636308480000000 31! 8222838654177922817725562880000000 32! 263130836933693530167218012160000000 33! 8683317618811886495518194401280000000 34! 295232799039604140847618609643520000000 35! 10333147966386144929666651337523200000000 36! 371993326789901217467999448150835200000000

We Stopped Here Last Time

Plan for today Pioneers of Computer Science Binary System Counting in Binary Binary Arithmetic Boolean Algebra Electronic Circuits: Logic Gates

Important Concepts Code Electricity Binary Code, Binary System Technology (mechanical gears, vacuum tubes, transistors, DNA, ) Math

Natural Selection COMPUTING Many Different Solutions & Technologies

Natural Selection COMPUTING

Natural Selection Shannon von Neumann COMPUTING Boole Turing

George Boole George Boole (1815-1854) Logic Values: True & False Operators: AND, OR, NOT Boolean Algebra Credit: https://upload.wikimedia.org/wikipedia/commons/c/ce/george_boole_color.jpg

Logic Word-Problem The year is 2030, you are sick, in bed, and you send your robot to Stop & Shop, instructing it to pick up some ice cream, with the following request: "Any fruit ice cream or anything with vanilla" Stop & Shop currently carries chocolate ice cream raspberry sorbet Does your logically flawless robot bring anything back? Image credit: https://tekworld.com/media/catalog/category/personal_robot.jpg

Logic Word-Problem The year is 2030, you are sick, in bed, and you send your robot to Stop & Shop, instructing it to pick up some ice cream, with the following request: "Anything with fruit and with vanilla" Stop & Shop currently carries strawberry ice cream lemon sorbet REVISED raspberry vanilla ice cream Does your logically flawless robot bring anything back? Image credit: https://tekworld.com/media/catalog/category/personal_robot.jpg

Rules of Boolean Logic False False True True False True False True > > > >

Rules of Boolean Logic Not Not False True > >

Math to the rescue! True and False can be "coded" as 1 and 0 We can easily convert decimal numbers into binary numbers We can easily convert binary numbers into decimal numbers We can do arithmetic with binary numbers (Soon to be explored )

Second Important Link Claude Shannon s Master s Thesis MIT, 1937 Shows relationship between boolean logic and arithmetic: any integer arithmetic operation can be implemented using logic operations https://en.wikipedia.org/wiki/claude_shannon#/media/file:claudeshannon_mfo3807.jpg

TRUE & FALSE AND, OR, NOT 1, 0 Binary ELECTRICITY ON, OFF

Third Important Link John von Neumann, 1945 Writes an unpublished report "First Draft of a Report on the EDVAC" Report becomes defacto standard for how to design computers https://en.wikipedia.org/wiki/john_von_neumann#/media/file:johnvonneumann-losalamos.gif

Third Important Link Early Technologies John von Neumann, 1945 Writes an unpublished report "First Draft of a Report on the EDVAC" Report becomes defacto standard for how to design computers https://en.wikipedia.org/wiki/john_von_neumann#/media/file:johnvonneumann-losalamos.gif

Introduction to Binary Counting in Decimal Counting in Binary Counting in a different base Adding in Decimal Adding in Binary

Continue on the whiteboard We just finished counting in decimal on Monday

We Stopped Here Last Time

"Mechanical" Counting 0 1 2 3 4 5 6 7 8 9 0 1 2 Rule 1: Roll

"Mechanical" Counting 00 01 02 03 04 05 06 07 08 09 10 11 12 Rule 2: Increment the digit to the left

"Mechanical" Counting? 70 71 72 73 74 75 76 77 78 79 0 1 2

"Mechanical" Counting 70 71 72 73 74 75 76 77 78 79 80 81 82

"Mechanical" Counting 9 0 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 0 1 2

"Mechanical" Counting 9 0 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 0 1 2

"Mechanical" Counting 9 0 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 0 1 2

"Mechanical" Counting 9 0 9 1 9 2 9 3 9 4 9 5 9 6 9 7 9 8 9 9 0 0 0 1 0 2

"Mechanical" Counting 0 9 0 0 9 1 0 9 2 0 9 3 0 9 4 0 9 5 0 9 6 0 9 7 0 9 8 0 9 9 0 0 0 1 0 2

"Mechanical" Counting 0 9 0 0 9 1 0 9 2 0 9 3 0 9 4 0 9 5 0 9 6 0 9 7 0 9 8 0 9 9 1 0 0 1 0 1 1 0 2

Counting in Binary Only 2 digits: 0 1 0 has no weight (as in decimal) Start 0, 1, and apply Rule 1 and Rule 2, as done previously

Exercise Count in a system with 4 digits: O, P, Q, R O has weight zero Assume that O < P < Q < R

Arithmetic in Decimal

0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 7 5 2 1 + 8 6 5 6 7 5 2 1 + 1 4 9 3

Arithmetic in Binary!

0 0 0 1 1 0 1 1 0 0 0 1 + 1 1 1 1 1 0 1 1 + 0 1 0 0 1 1 0 1 1 + 1 1 0 1 0

Conversion Binary to Decimal

Continue on the whiteboard

We Stopped Here Last Time

Homework Assignment Released this weekend Due Sunday 09/24 midnight

Review We can count in binary We can add in binary We can convert a binary number to its decimal equivalent Converting a decimal number to binary? Yes we can!

Review We ll skip this part We can count in binary We can add in binary We can convert a binary number to its decimal equivalent Converting a decimal number to binary? Yes we can!

Important: Whichever arithmetic operation we can perform in decimal, we can also do in binary.

Back to Boolean Logic a b a and b F F F F T F T F F T T T

Back to Boolean Logic a b a and b F F F F T F T F F T T T a b a or b F F F F T T T F T T T T

Back to Boolean Logic a b a and b F F F F T F T F F T T T a b a or b F F F F T T T F T T T T a F T not a T F

Why just 3 operators? AND, OR, and NOT are necessary and sufficient to implement any boolean function.

Example a b a? b F F F F T T T F T T T F

Example a b a? b F F F Case 1 Case 2 F T T T F T T T F a?b = (Case 1) OR (Case 2)

Example a b a? b Case 1 Case 2 F F F F F Case 1 F T T Case T 1 F Case 2 T F T Case F 2 T T T F F F a?b = (Case 1) OR (Case 2)

Example NOT a a b a? b Case 1 Case 2 T F F F F F Case 1 T F T T Case T 1 F Case 2 F T F T Case F 2 T F T T F F F a?b = (Case 1) OR (Case 2)

Example NOT a a b a? b Case 1 Case 2 T F F F F F Case 1 T F T T Case T 1 F Case 2 F T F T Case F 2 T F T T F F F a?b = (NOT a AND b) OR (Case 2)

Example AND, OR, and NOT are necessary and sufficient to implement any boolean function. NOT b NOT a a b a? b Case 1 Case 2 T T F F F F F Case 1 F T F T T Case T 1 F Case 2 T F T F T Case F 2 T F F T T F F F a?b = (NOT a AND b) OR (Case 2)

Example AND, OR, and NOT are necessary and sufficient to implement any boolean function. NOT b NOT a a b a? b Case 1 Case 2 T T F F F F F Case 1 F T F T T Case T 1 F Case 2 T F T F T Case F 2 T F F T T F F F a?b = (NOT a AND b) OR (a AND NOT b)

Example vanilla fruit vanilla xor fruit F F F F T T T F T T T F

Example vanilla fruit vanilla xor fruit F F F F T T T F T T T F "Get (vanilla and no fruit) or (no vanilla and fruit)"

Basic Electricity photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Basic Electricity + - photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Basic Electricity + - photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Basic Electricity + - ON True 1 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Basic Electricity + - OFF False 0 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Simplification + - OFF False 0 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Simplification ON True 1 OFF False 0 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Boolean Variables a True 1 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Boolean Variables a False 0 photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Boolean Variables a photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Special Switches a photo credit: https://media1.britannica.com/eb-media/42/100742-004-9c5f5e40.jpg

Mystery Circuit a b T 1

Logic Gates