Component 1 – 2A, B, C Binary Logic

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Chapter 2 Logic Circuits.
Boolean Algebra and Reduction Techniques
Boolean rules for simplification Dr. Ahmed Telba.
Propositional Calculus Math Foundations of Computer Science.
Digital Fundamentals with PLD Programming Floyd Chapter 4
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
CS1Q Computer Systems Lecture 6 Simon Gay. Lecture 6CS1Q Computer Systems - Simon Gay2 Algebraic Notation Writing AND, OR, NOT etc. is long-winded and.
Combinational Logic 1.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
4. Computer Maths and Logic 4.2 Boolean Logic Simplifying Boolean Expressions.
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
Boolean Algebra and Reduction Techniques
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. De Morgan’s Theorem De Morgan’s Theorem.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
DeMorgan’s Theorem DeMorgan’s 2 nd Theorem The complement of a sum of variables is equal to the product of the complemented variables. A + B = A. B Applying.
Chapter 5 Boolean Algebra and Reduction Techniques 1.
1 Ch.3 Logic Gates and Boolean Algebra – Part 1
1 Binary Signals Logic gate circuits are designed to input and output only two types of signals: “high” (1) and “low” (0), as represented by a variable.
CHAPTER 2 Boolean algebra and Logic gates
Boolean Algebra Learning Objectives Learn that Boolean algebra produces a result that equals TRUE or FALSE Learn how truth tables are used to represent.
EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Computer Architecture & Operations I
Boolean Algebra & Logic Gates
Unit 1 Logical operators.
Morgan Kaufmann Publishers
Component 1 Logical operators.
Department of Preparatory Year, Umm Al Qura University
Chapter 3 Notes – Part II Review Questions
De Morgan’s Theorem,.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
DeMorgan’s Theorem DeMorgan’s 2nd Theorem
Questions Describe the following gates
Unit 2 Boolean Algebra.
Boolean Algebra & De Morgan's Theorems
Lesson Objectives Aims Be able to define problems using Boolean logic
Logic Gates and Boolean Algebra
CS 105 Digital Logic Design
CHAPTER 2 Boolean Algebra
Boolean Algebra and Combinational Logic
Boolean Algebra.
Princess Sumaya University
Boolean Algebra – Part 1 ECEn 224.
SLIDES FOR CHAPTER 2 BOOLEAN ALGEBRA
TN 221: DIGITAL ELECTRONICS 1
Jeremy R. Johnson Wed. Sept. 29, 1999
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
Propositional Calculus: Boolean Algebra and Simplification
BASIC & COMBINATIONAL LOGIC CIRCUIT
Fundamentals of Computer Systems
Boolean Algebra.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION Part (a)
De Morgan’s laws presentation
GCSE Computer Science – Logic Gates & Boolean Expressions
Digital Fundamentals Floyd Chapter 4 Tenth Edition
ECE 352 Digital System Fundamentals
Analysis of Logic Circuits Example 1
Component 1 – 2A, B, C Binary Logic
Laws & Rules of Boolean Algebra
ECE 352 Digital System Fundamentals
Chapter 3 – Describing Logic Circuits
Presentation transcript:

Component 1 – 2A, B, C Binary Logic Mr Petford

Thinking Task What can you tell me about this?

Thinking Task What can you tell me about this? If there are CLOUDS and COLD there will be RAIN

Thinking Task What can you tell me about this? If A and B are TRUE then Q is TRUE

Thinking Task

Thinking Task Q=1 when A is not 1 Only 1 and 1 = 1 1 and 0 = 0 (or does not = 1)

Learning Intentions 2A – Draw truth tables for Boolean expressions consisting of AND, OR, NOT, XOR, NAND and NOR logical operations 2B – Apply logical operations to combinations of conditions in programming, including clearing registers, masking, and encryption 2C - Simplify Boolean expressions using Boolean identities, rules and De Morgan’s laws

Binary Logic – Not Gate Logic Diagram If 0 is input it outputs 1 Boolean Algebra: P = A’ P = A Logic Diagram

Binary Logic – AND Gate Logic Diagram If both inputs are 1 then the output is 1 Otherwise the output is 0 INPUT A B OUTPUT P Boolean Algebra: P = A.B P = AB P = AxB Logic Diagram

Boolean Algebra: P = A + B Binary Logic – OR Gate If either input is 1 then the output is 1 Otherwise the output is 0 INPUT A B OUTPUT P Boolean Algebra: P = A + B Logic Diagram

Boolean Algebra: P = A ⊕ B Binary Logic – XOR Gate If either input is 1 then the output is 1 UNLESS! Both are 1! Otherwise the output is 0 INPUT A B OUTPUT P Boolean Algebra: P = A ⊕ B Logic Diagram

Binary Logic – NAND Gate NAND stands for NOT AND If both inputs are 1 then the output is 0 Otherwise the output is 1 A B P 1 INPUT A B OUTPUT P Boolean Algebra: P = A.B P = AB P = AxB Logic Diagram

Boolean Algebra: P = A+B Binary Logic – OR Gate NOR stands for NOT OR If either input is 1 then the output is 0 Otherwise the output is 1 A B P 1 INPUT A B OUTPUT P Boolean Algebra: P = A+B Logic Diagram

Combining Logic Gates Logic Gates can be combined to produce logic systems. Consider the following examples and notice how the diagrams can be turned into expressions by “labelling the branches”.

Is your logic efficient? It is possible to Evaluate a series of logic gates to see if the amount of them can be reduced. Lets consider the following example 1. Get the expression for this logic gate 2. Draw a truth table to show each part 3. Look for inefficiencies (This can be difficult just by looking)

How do I simplify Boolean Algebra? In your exam you may be asked to simplify Boolean Algebra. That should be done using + Boolean Algebra Laws + De morgans Law Using conventional Algebra we can simplify expressions such as… simplify 2x + 6y. Giving an answer of 2(x+3y). OR.. + abc + bcd = bc(a+d) + 2xy – 4yz = 2y(x+2z) etc.

How do we simplify? Boolean algebra is very similar, we try to remove common elements to simplify the expression. There are a few things that we can do to enable the expression to become much simpler if we can remember some basic combinations that help to reduce terms significantly. These special terms are called identities, and you will have to remember them as they are not reproduced on the information sheet of the examination paper.

De Morgan's Law De Morgan did a lot of the work in the 19th Century that allows logic systems to exist today. His law is relating to NOT, OR and AND gates and allows us to use less gates. Less gates in a computer system makes it more efficient and allows us to use less space. Try these out and discover for yourself!

Algebra Laws - identity The Sum(OR) of anything and Zero is the same as the original The sum (OR)of anything and One is always 1. The Sum(OR) of Anything and its self is the same as the original

Algebra Laws - identity Next we can find complimenting inputs. Since either input must be 1 the sum(OR) is also 1.

Algebra Laws - identity Just as there are four Sum (OR) identities There are also 4 multiplicative identities Which can be seen below

Algebra Laws - identity Finally we have to consider double compliment. We can simply remove any double compliment to be left with the underlying expression

Algebra Laws - identity To simplify…

Algebra Laws - commutative The next law applies equally to both addition(OR) and Multiplication (AND). This basically states that the order of input does not effect the output.

Algebra Laws - distributive This is the law that explains how to expand an expression formed by the product(AND) of a Sum(OR).

Algebra Laws - associative This tells us that we can associate groups of added or multiplied parentheses without altering the truth of the equation.

Algebra Laws - redundancy law This states that in some instances gates are redundant and can be removed altogether. This also applies to A · (A + B) = A

Simplifying Boolean Expressions (1) Simplify the following expression. Simplification can begin by looking for common terms, in this case A is common to all terms so we can remove this outside a bracket as shown below:

Simplifying Boolean Expressions (2) Now we can see that B is common to the first two terms inside the bracket, but it is not common to the last term so we cannot include this in the simplification, which now becomes: Using our sixth identity the term so the expression now becomes:

Simplifying Boolean Expressions (3) Using our sixth identity the term so the expression now becomes: Using the first identity B.1 = B so the expression becomes

Simplifying Boolean Expressions (4) Using our sixth identity again the term so the expression now becomes: Using the first identity A.1 = A so the expression finally becomes

De Morgans Law DeMorgan’s theorem allows the logic functions of NAND and NOR to be simplified. We do not have to go into in depth analysis of how De Morgan arrived at his theorem, just be able to use the result which is surprisingly simple. The rules are as follows: 1 - If you break a ‘bar’ change the sign underneath the break. 2 - If you complete a ‘bar’ change the sign underneath where the bar is joined.

Find out how! Draw the truth tables for the following…

If we start with , DeMorgan’s theorem suggests that this can be written as . The ‘bar’ has been broken and the sign changed underneath the break in the bar. We can check this by looking at the truth table below. This shows that the two logic expressions are the same. The rule seems to work, according to the truth tables but we have only used very basic logic expressions here to prove the rule. If we looked at a more realistic problem then this would involve more terms and a more complex expression.

Have a go… Find the Boolean Expressions for the following…

Have a go… Find the Boolean Expressions for the following…

Using De Morgans Theorm we can break this. If we look at the first term we can see that there is a double ‘bar’ over the expression. This means that the term is inverted and then inverted again, which will return the original state of the term. Therefore the double inversion as it is called can be removed. We now apply DeMorgan’s theorem again to the second term to give the following: Again we have a double inversion, applied only to the variable C, which can be removed to leave the final expression as:

Homework – Pre-Reading Chapter 3: Algorithms Flow Charts Pseudocode Variables and Constants Self-documents identifiers, annotation program layout