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

Similar documents
Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

EEE130 Digital Electronics I Lecture #4

Boolean Algebra & Logic Gates. By : Ali Mustafa

COS 140: Foundations of Computer Science

COMP 2600: Formal Methods for Software Engineeing

Lab 1 starts this week: go to your session

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

1 Boolean Algebra Simplification

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.

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

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

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

Slides for Lecture 10

ELEC Digital Logic Circuits Fall 2014 Boolean Algebra (Chapter 2)

CSC9R6 Computer Design. Practical Digital Logic

CS 226: Digital Logic Design

Logic and Boolean algebra

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

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

Lecture 3: Boolean Algebra

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

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

Topic 1: Propositional logic

Boolean Algebra & Digital Logic

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

MODULE- 07 : FLUIDICS AND FLUID LOGIC

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

Digital Logic (2) Boolean Algebra

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

SAMPLE ANSWERS MARKER COPY

Logic Design. Chapter 2: Introduction to Logic Circuits

DISCRETE STRUCTURES WEEK5 LECTURE1

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

Digital Logic Design. Malik Najmus Siraj

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

BOOLEAN ALGEBRA THEOREMS

Binary Logic and Gates

Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017

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

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

Propositional Logic. Spring Propositional Logic Spring / 32

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

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

CHAPTER III BOOLEAN ALGEBRA

Propositional natural deduction

Chapter 4, Logic using Propositional Calculus Handout

Chapter 2 Boolean Algebra and Logic Gates

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

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

CISC-102 Winter 2016 Lecture 17

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

CS/COE0447: Computer Organization and Assembly Language

Combinational Logic Design Principles

Boolean algebra. Values

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

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

1. Name the person who developed Boolean algebra

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

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

Computer Organization I

Math.3336: Discrete Mathematics. Propositional Equivalences

211: Computer Architecture Summer 2016

CHAPTER III BOOLEAN ALGEBRA

Proving logical equivalencies (1.3)

Section 1.1: Logical Form and Logical Equivalence

Combinational Logic Fundamentals

CSE 20 DISCRETE MATH. Fall

CHAPTER 7. Solutions for Exercises

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

Chapter 2 Combinational Logic Circuits

T02 Tutorial Slides for Week 6

Prof.Manoj Kavedia 2 Algebra

10/14/2009. Reading: Hambley Chapters

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

Chapter 7 Logic Circuits

CSE 20: Discrete Mathematics

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

CHAPTER 3 BOOLEAN ALGEBRA

Compound Propositions

CISC-102 Fall 2018 Week 11

Switches: basic element of physical implementations

This form sometimes used in logic circuit, example:

Chapter 2. Boolean Algebra and Logic Gates

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

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

Binary addition example worked out

Chapter 2: Switching Algebra and Logic Circuits

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

Digital Circuit And Logic Design I. Lecture 3

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

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

CS/COE0447: Computer Organization

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Boolean Algebra and Digital Logic

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

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

Transcription:

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

First Year Computer Hardware Course Lecturers Duncan Gillies Bjoern Schuller Doc112: Hardware Lecture 1 Slide 2

Timings Normally thursday afternoons will be organised as follows: 14.00 Lecture 15.00 Tutorial 16.00 Lecture But because today is the DocSoc Sponsors Exhibition the times will be as follows: 14.00 Lecture 15.00 Tutorial 15.45 Lecture Doc112: Hardware Lecture 1 Slide 3

Lectures The course will begin with Boolean Algebra, and will end with the design of a thirty-two bit computer. The first twelve lectures cover techniques in the design of digital circuits. The last six lectures will be concerned with the design of a computer. Doc112: Hardware Lecture 1 Slide 4

Tutorials Tutorials will serve three purposes: 1. They will provide design examples to reinforce understanding of the lecture material. 2. They will give valuable practice in answering examination style problems. 3. They provide a venue to discuss problems with the tutors and lecturers. Doc112: Hardware Lecture 1 Slide 5

Coursework There are two courseworks which are both practical design exercises. The first is a combinatorial circuit design exercise and will start during week three. You will need to complete it by week five. Submission will be in the form of a short report plus a circuit design which you can test with a simulator. Doc112: Hardware Lecture 1 Slide 6

Coursework The second exercise is a sequential circuit design which you should do at the start of term 2. It will involve designing and testing a circuit with a professional software system called Quartus II. The total continuous assessment mark for the course comprises: Combinatorial Circuit Design 60% Sequential Circuit Design 40% Doc112: Hardware Lecture 1 Slide 7

Books The best advice about books is: Don t buy anything until you are sure you need it. The notes for the course are comprehensive and cover all the material, so you really do not need anything else. Doc112: Hardware Lecture 1 Slide 8

Course Materials Online All lecture notes, tutorial problem sheets and coursework instructions are available from the course web page: www.doc.ic.ac.uk/ dfg which can be found through CATE. Tutorial solutions will be posted on the web after each tutorial. We will have a discussion forum for the course via the piazza system. Doc112: Hardware Lecture 1 Slide 9

Lecture 1 Boolean Algebra George Boole (1815-1864) Doc112: Hardware Lecture 1 Slide 10

Binary Arithmetic Computer hardware works with binary numbers, but binary arithmetic is much older than computers. Ancient Chinese Civilisation (3000 BC) Ancient Greek Civilisation (1000 BC) Boolean Algebra (1850) Doc112: Hardware Lecture 1 Slide 11

Propositional Logic The Ancient Greek philosophers created a system to formalise arguments called propositional logic. A proposition is a statement that can be TRUE or FALSE Propositions can be compounded by means of the operators AND, OR and NOT Doc112: Hardware Lecture 1 Slide 12

Propositional Calculus Example The following two statements are propositions which may be TRUE or FALSE: it is raining the weather forecast is bad A combined proposition example is: it is raining OR the weather forecast is bad Doc112: Hardware Lecture 1 Slide 13

Propositional Calculus Example We can assign values to propositions, for example: I will take an umbrella IF it is raining OR the weather forecast is bad Means that the proposition I will take an umbrella is the result of the Boolean combination (OR) between raining and weather forecast is bad. In fact we could write: I will take an umbrella = it is raining OR the weather forecast is bad Doc112: Hardware Lecture 1 Slide 14

Diagrammatic representation We can think of the umbrella proposition as a result that we calculate from the weather forecast and the fact that it is raining by means of a logical OR. Doc112: Hardware Lecture 1 Slide 15

Truth Tables Since propositions can only take two values, we can express all possible outcomes of the umbrella proposition by a table: Doc112: Hardware Lecture 1 Slide 16

More complex propositions We can make our propositions more complex, for example: (Take Umbrella ) = ( NOT (Take Car ) ) AND ( (Bad Forecast ) OR (Raining ) ) and as before represent this diagrammatically: Doc112: Hardware Lecture 1 Slide 17

Boolean Algebra To perform calculations quickly and efficiently we can use an equivalent, but more succinct notation than propositional calculus. We also need a to have a well-defined semantics for all the operators, or connectives that we intend to use. The system we will employ is called Boolean Algebra (introduced by the Lincolnshire mathematician George Boole in 1850) and satisfies the criteria above. Doc112: Hardware Lecture 1 Slide 18

Fundamentals of Boolean Algebra The truth values are replaced by 1 and 0: 1 = TRUE 0 = FALSE Propositions are replaced by variables: R = it is raining W = The weather forecast is bad Operators are replaced by symbols = NOT + = OR = AND Doc112: Hardware Lecture 1 Slide 19

Boolean Algebra has Simple Notation Our previous long winded proposition: Take Umbrella = ( NOT (Take Car ) ) AND ( Bad Forecast OR Raining ) can be represented by the concise equation: U = (C ) (W+R) Doc112: Hardware Lecture 1 Slide 20

Precedence Further simplification is introduced by defining a precedence for the evaluation of the operators. The highest precedence operator is evaluated first. U = (C ) ( W+R ) = C (W+R) Note that C (W+R) is not the same as C W+R Doc112: Hardware Lecture 1 Slide 21

Truth Tables The individual Boolean algebra operators can be defined by truth tables which have an entry for each possible outcome: Doc112: Hardware Lecture 1 Slide 22

Truth tables can be constructed for any equation Given any Boolean expression eg: U = C (W+R) We can calculate a truth table for every possible value of the variables on the right hand side. For n variables there are 2 n possibilities. Doc112: Hardware Lecture 1 Slide 23

The truth table for the Umbrella equation U = C (W+R) Doc112: Hardware Lecture 1 Slide 24

Problem Break It s time for you to wake up and do some work! Using Boolean algebra construct a truth table to enumerate all possible values of: R = A B + C Doc112: Hardware Lecture 1 Slide 25

Algebraic Manipulation One purpose of an algebra is to manipulate expressions - usually to simplify them - without necessarily evaluating them. Boolean algebra has many manipulation rules, for example, concerning negation and its combination with and/or: (A ) = A A A = 0 A + A = 1 These rules may be verified by constructing a truth table. Doc112: Hardware Lecture 1 Slide 26

There are the usual algebraic rules Associative: (A B) C = A (B C) (A+B)+C = A+(B+C) Commutative: A B = B A A+B = B+A Distributive: A (B+C) = A B + A C A+(B C) = (A+B) (A+C) (strange but true!) Doc112: Hardware Lecture 1 Slide 27

Simplification Rules Simplification rules allow us to reduce the complexity of a Boolean expression: Simplification rules with single variables: A A = A A+A = A Doc112: Hardware Lecture 1 Slide 28

Simplification Rules Equations including 1 or 0 can often be dramatically simplified: A 0 = 0 A 1 = A A + 0 = A A + 1 = 1 Note that here (as always) A and B can be any Boolean expression. (P (Q+R ) + S) ( A A ) = 0 Doc112: Hardware Lecture 1 Slide 29

Further Simplification Rules There are many possible simplification rules involving more than one variable. We will look at just one: A + A ( B ) = A It is possible to prove this by construction a truth table, or by direct proof as follows: A + A B = A (1+B) (Distributive law) A (1+B) = A 1 (Simplification rule with 1 and 0) A 1 = A (Simplification rule with 1 and 0) Doc112: Hardware Lecture 1 Slide 30

de Morgans Theorem Two of the most used simplification rules are derived from from de Morgans theorem: (A+B) = A B (A B) = A + B Note that (as before) A and B can be any Boolean expression. Doc112: Hardware Lecture 1 Slide 31

The General form of de Morgan s theorem The theorem holds for any number of terms, so: and using induction: (A+B+C) = ( (A+B)+C) ( (A+B)+C) = ( (A+B) ) C ( (A+B) ) C = A B C (A B C... X) = A + B + C +...+ X Doc112: Hardware Lecture 1 Slide 32

The principle of Duality Every Boolean equation has a dual, which is found by replacing the AND operator with OR and vice versa: We saw one example in de Morgans theorem: (A+B) = A B (A B) = A + B Doc112: Hardware Lecture 1 Slide 33

Every simplification rule has a dual form The simplification rule: A + A B = A Has a dual equation: A (A + B) = A Note that the brackets are added to maintain the evaluation order. Proof: A (A + B) = A A + A B A A + A B = A + A B A + A B = A Doc112: Hardware Lecture 1 Slide 34

Complement equations Boolean equations also have a complement found by negating both sides: U = C (W+R) has the complement equation U = (C (W+R)) Doc112: Hardware Lecture 1 Slide 35

Simplification using de Morgan s Theorem U = (C (W+R)) Can be simplified using de Morgans theorem (C (W+R)) = C + (W+R) C + (W+R) = C + W R or, in propositional logic: I will not take the umbrella = I am going by car OR the weather forecast is good AND it is not raining! Doc112: Hardware Lecture 1 Slide 36

Don t forget Lecture 2 will begin at 15.45 Doc112: Hardware Lecture 1 Slide 37