Unit 4: Computer as a logic machine

Similar documents
Computer Organization: Boolean Logic

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

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

Unit 8A Computer Organization. Boolean Logic and Gates

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

Logic Design. Chapter 2: Introduction to Logic Circuits

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Boolean Algebra, Gates and Circuits

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

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

Topic 1: Propositional logic

Switches: basic element of physical implementations

Digital Logic (2) Boolean Algebra

Gates and Flip-Flops

Fundamentals of Digital Design

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Digital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Implementation of Boolean Logic by Digital Circuits

Computer organization

Boolean Algebra & Digital Logic

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

CHAPTER1: Digital Logic Circuits Combination Circuits

Intro To Digital Logic

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

COS 140: Foundations of Computer Science

A statement is a sentence that is definitely either true or false but not both.

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

ECE/CS 250 Computer Architecture

CS 173 Lecture 2: Propositional Logic

CSE 20 DISCRETE MATH. Fall

10/14/2009. Reading: Hambley Chapters

ECE/CS 250: Computer Architecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Benjamin Lee

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

CSC9R6 Computer Design. Practical Digital Logic

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

Chapter 2: Switching Algebra and Logic Circuits

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

Experiment 7: Magnitude comparators

Part I: Propositional Calculus

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

Binary addition example worked out

CS 226: Digital Logic Design

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Chapter 4, Logic using Propositional Calculus Handout

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.

Definition 2. Conjunction of p and q

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Discussion 1A

Every time has a value associated with it, not just some times. A variable can take on any value within a range

ECE 545 Digital System Design with VHDL Lecture 1A. Digital Logic Refresher Part A Combinational Logic Building Blocks

S C F F F T T F T T S C B F F F F F T F T F F T T T F F T F T T T F T T T

THE LOGIC OF COMPOUND STATEMENTS

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

Combinational Logic. By : Ali Mustafa

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

Chapter 2 Boolean Algebra and Logic Gates

CHAPTER 12 Boolean Algebra

Boole Algebra and Logic Series

Logic Gates and Boolean Algebra

Propositional Logic: Equivalence

CMPE12 - Notes chapter 2. Digital Logic. (Textbook Chapters and 2.1)"

Looking at a two binary digit sum shows what we need to extend addition to multiple binary digits.

Slides for Lecture 10

Section 1.1: Logical Form and Logical Equivalence

EECS Variable Logic Functions

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Chapter 1: Logic systems

Boolean Algebra & Logic Gates. By : Ali Mustafa

Chapter 5. Digital systems. 5.1 Boolean algebra Negation, conjunction and disjunction

Boolean Logic Prof. James L. Frankel Harvard University. Version of 3:20 PM 29-Aug-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved.

Adequate set of connectives, logic gates and circuits

CS187 - Science Gateway Seminar for CS and Math

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Chapter 2 Combinational Logic Circuits

Combinational Logic. Review of Combinational Logic 1

Circuits & Boolean algebra.

Review: Additional Boolean operations

Truth-Functional Logic

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

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

UNIVERSITI TENAGA NASIONAL. College of Information Technology

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

Hakim Weatherspoon CS 3410 Computer Science Cornell University

CS61c: Representations of Combinational Logic Circuits

1. Name the person who developed Boolean algebra

How The Journey Starts

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

1 Boolean Algebra Simplification

Binary Logic and Gates

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Chapter 2 Combinational Logic Circuits

Sample Marking Scheme

22c:145 Artificial Intelligence

Chapter 2 Boolean Algebra and Logic Gates

Lecture 4 Modeling, Analysis and Simulation in Logic Design. Dr. Yinong Chen

Transcription:

Unit 4: Computer as a logic machine Propositional logic Boolean algebra Logic gates Computer as a logic machine: symbol processor Development of computer The credo of early AI Reference copyright c 2013 Hyeong In Choi 1 / 26

Propositional Logic Atomic statement (logical variable, propositional variable) e.g. p: Two plus two equals four q: Apple is a mineral. Each atomic statement is always either true or false. We use a single lower-case Roman alphabet to denote an atomic statement, which is also called a logical variable Logical variable must have the unambiguously decidable value T (true) or F (false) 2 / 26

Propositional Logic Logical Connectives Atomic statements are combined to yield a more complex statement using the following logical connectives NOT OR AND IMPLY 3 / 26

Propositional Logic Statement (expression, formula) A, B, C a well-formed expression involving variables, connectives and parentheses (there is a precise definition of well-formed expression and an algorithm to check if an expression is well-formed) non-sense expressions like p q, A B, ( A) B are not allowed (by checking if the statement in question is well-formed) statement can be just single logical variable or it could be a more complicated statements created by combining simpler statements using connectives and parentheses the value of a statement is T or F, depending on the values of the variables contained therein 4 / 26

Propositional Logic Truth Table NOT( ) p T F p F T 5 / 26

Propositional Logic Truth Table (Cont d) OR( ) p q p q T T T T F T F T T F F F 6 / 26

Propositional Logic Truth Table (Cont d) AND( ) p q p q T T T T F F F T F F F F 7 / 26

Propositional Logic Truth Table (Cont d) IMPLY( ) The truth value of p q is defined as follows p q p q T T T T F F F T T F F T The reason to assert p q is true when p is false is that the only case this conditional statement (p q) is manifestly false is when p=t and q=f ; therefore, all other cases are taken to be true 8 / 26

Propositional Logic Truth Table (Cont d) IMPLY( ) p q p p q T T F T T F F F F T T T F F T T p q and p q have the same truth value; hence they are deemed logically identical 9 / 26

Propositional Logic Truth Table (Cont d) Example p q q p p (q p) T T T T T F T T F T T T F F F T p (q p) is always true no matter which truth value p or q has such always-true statement is called a theorem and is denoted by adding : sign in front of the statement, i,e., : p (q p) means p (q p) is a theorem 10 / 26

Propositional Logic Truth Table (Cont d) Example (Contraposition) p q p q p q q p (p q) ( q p) T T F F T T T T F F T F F T F T T F T T T F F T T T T T (p q) ( q p) is always true no matter which truth value p or q has thus : (p q) ( q p) 11 / 26

Boolean algebra Set: S={0,1} two elements Algebraic operations: addition(+) & multiplication( ) + 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 12 / 26

Boolean algebra Correspondence with Propositional Logic T 1 F 0 + OR AND Involution 0 = 1 1 = 0 involution(-) negation( ) 13 / 26

Boolean algebra All laws of arithmetic hold for Boolean algebra commutative law a + b = b + a a b = b a associative law (a + b) + c = a + (b + c) (a b) c = a (b c) distributive law a (b + c) = (a b) + (a c) a + (b c) = (a + b) (a + c) 14 / 26

Boolean algebra additive unit: 0 0 + a = a = a + 0 multiplicative unit: 1 1 a = a = a 1 involution (de Morgan s law) a + b = a b a b = a + b 15 / 26

Logic Gates AND a c b OR a c b XOR (Exclusive OR) c = a b c = a + b a b c c = a b = a b + ā b 0 1 0 0 1 1 1 0 16 / 26

Logic Gates NOT a c c = ā NAND a b NOR a b c c c = ab = ā + b (a + b) = ā b 17 / 26

Logic Gates Half Adder Regard 0 and 1 as single-digit binary numbers Sum rule for a+b 0 + 0 0 0 carry sum { 1 + 0 0 1 1, if a b s: sum= 0, if a = b { c: carry= 1, if a = b = 1 0, else 0 + 1 0 1 1 + 1 1 0 18 / 26

Logic Gates Logic circuit for half adder a b s { 1, if a b s = a b = a b + āb = 0, if a = b { 1, if a = b = 1 c = a b = 0, else c 19 / 26

Logic Gates Full Adder A logic circuit to add two multi-digit binary numbers. (Example) 1 0 1 1 + 1 0 0 1 1 0 1 0 0 Compuer Architecture Each logic variable is represented physically by voltage level. e.g. in positive logic circuit 1 High voltage (2.8 5 volts) 0 Low voltage (0 0.4 volts) negative logic: high & low voltages are reversed 1 Low voltage (0 0.4 volts) 0 High voltage (2.8 5 volts) Logic gates are constructed as transistor circuits embedded in IC (integrated circuit) ship 20 / 26

Compuser as a logic machine:symbol processor The fundamental operational principle behind computer is Boolean algebra (propositional logic) Everything, including numbers, is (represented by) logical symbol(s) Then why not use computer as a symbol processor? 21 / 26

Development of computer Computer s are dreamed up by many mathematicians for many centuries Pascals adding machine Babbage s difference engine and analytical engine (19 th century) First programmable mechanical computer First programmer: Countess Ada Lovelace (daughter of Lord Byron) Turing Machine: purely mathematical construct Von Neumann: stored program architecture ENIAC (Electron Numerical Integrator And Computer) by Mauchly and Eckert (1946) With about 17,000 vacuum tubes; 7,000 diodes; weighing 27t Computers later evloved into transistor- and IC-based machine of the present day. 22 / 26

Development of computer All computers are logically the same: Turing machine movie Any computer can emulate any other computer: Universal Turing machine as opposed to old machine that is dedicated to one unique task Software is a means to realize such universality in practice: with one computer, we can do a whole bunch of disparate things 23 / 26

The credo of early AI What is intelligence? Isn t it just a rational expression of things and concepts? Why can t one manipulate symbols and realize that intelligence? Mind is a symbolic processing entity and so is computer Since computer is nothing but a logical symbol processing machine, why not use it to realize intelligence? movie 24 / 26

The credo of early AI I am convinced that machinese can and will think. I don t mean that machines will behave like men. I don t think for very long time we are gonna have difficult problem of distinguishing man from a robot. i don t think my daughter will ever marry a computer. But i think computers will be doing the things men do when we say they are thinking. I am convinced that machines can and will think in our life time. (Oliver G. Selfridge) movie 25 / 26

Reference Martin Davis: The Universal Computer, W. W. Norton & Co., 2000 최형인 : 명제계산 (Propositional Calculus) 2004 최형인 : 현대컴퓨터개요 2005 (1) (2) 26 / 26