Binary Logic Derrington KCL CPD/SKE 2014. Binary We’ve seen how data of all different sorts and kinds can be represented as binary bits… 0s and 1s 1 is.

Slides:



Advertisements
Similar presentations
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Advertisements

Logic Gates.
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Programmable Logic Controllers.
GCSE Computing#BristolMet Session Objectives#5 MUST explain why data is represented in computer systems in binary SHOULD understand and produce simple.
Boolean Algebra and Logic Gate
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
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.
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
In a not gate, if the input is on(1) the output is off (0) and vice versa.
3. DIGITAL ELECTRONICS..
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Activity 1 Revise / remember what the term ‘binary logic’ means. What do each of the following look like: NOT gate? AND gate? OR gate? 5 minutes.
GCSE Computing: A451 Computer Systems & Programming Activity 1 Grab a whiteboard and pen, come to the front and work out the.
TODAY YOU ARE LEARNING to explain why data is represented in computer systems in binary form 2. to understand and produce simple logic diagrams.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
CSC Intro. to Computing Lecture 5: Boolean Logic, Gates, & Circuits.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /05/2013 Lecture 4: Basics of Logic Design Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
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.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
A-Level Computing#BristolMet Session Objectives#6 MUST understand and produce simple logic diagrams using the operations NOT, AND and OR SHOULD explain.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
4. Computer Maths and Logic 4.2 Boolean Logic Simplifying Boolean Expressions.
1 Ethics of Computing MONT 113G, Spring 2012 Session 1 Digital Circuits, binary Numbers Course webpage:
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
5 - Digital Logic with Boolean Algebra
1 GCSE Computing Binary Logic. GCSE Computing 2 Candidates should be able to understand and produce simple logic diagrams using the operations NOT, AND,
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
Department of Preparatory Year, Umm Al Qura University CSCI 240 Digital Logic.
Activity 1 Grab a whiteboard and pen, come to the front and work out the Truth Table for the following circuit: 5 minutes R A B C Q.
Digital Logic. Boolean Algebra to Logic Gates Logic circuits are built from components called logic gates. The logic gates correspond to Boolean operations.
Boolean Algebra Learning Objectives Learn that Boolean algebra produces a result that equals TRUE or FALSE Learn how truth tables are used to represent.
Computer Architecture & Operations I
Computer Architecture & Operations I
Unit 1 Logical operators.
GCSE OCR Computing A451 Binary logic Computing hardware 6.
Activity 1 5 minutes Grab a whiteboard and pen, come to the front and work out the Truth Table for the following circuit: R A B C Q.
Basics of Logic gates - Part 1
Digital Logic.
Lesson Objectives Aims You should be able to:
Morgan Kaufmann Publishers
Component 1 Logical operators.
Logic Gates and Boolean Algebra
Chapter 3 Notes – Part II Review Questions
Logic Gates.
Computer Science 210 Computer Organization
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Logic Gates.
Logic Gates Benchmark Companies Inc PO Box Aurora CO
Computer Science 210 Computer Organization
Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan
CSE 311 Foundations of Computing I
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Circuits, Truth Tables & Boolean Algebra
For OCR GCSE Computing Unit 1 - Theory
Logic Gates.
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.
De Morgan’s laws presentation
GCSE Computer Science – Logic Gates & Boolean Expressions
Today You are Learning simple logic diagrams using the operations AND, OR and NOT truth tables combining Boolean operators using AND, OR and NOT.
Binary Logic.
Circuits, Truth Tables & Boolean Algebra
Truth tables Mrs. Palmer.
Presentation transcript:

Binary Logic Derrington KCL CPD/SKE 2014

Binary We’ve seen how data of all different sorts and kinds can be represented as binary bits… 0s and 1s 1 is used to denote the TRUTH or presence of a state And 0 the FALSITY or absence of a state Now we are going to look at binary logic At how inputs in the form of 0s and 1s can be logically processed And output… again in the form of 0s and 1s Using simple circuits called LOGIC GATES

Switches…. Circuits 1, 0 ON, OFF TRUE, FALSE BOOLEAN Logic… invented by George BOOLE enables computers to process binary data

The NOT gate Very simple If a 0 is input, then the output is a 1 And if the input is a 1 then the output is a zero AP NOT A A A

AND gate Two inputs BOTH 1 … output 1 Otherwise output 0 ABP A B A AND B A.B A B NB. ‘AND’ means BOTH They must BOTH be true A.B means A AND B

OR gate If either or both the inputs are 1 then the output is 1 If neither of them are 1, the output is zero ABP A + B A B NB CURVE A OR B (or both) A B A + B + means OR

Combinations of these three eg NAND and NOR (this is all at GCSE) When drawing the circuits and writing the truth tables for more complex combinations of these three gates.. Start with all the possible combinations of A and B (0 and 1) AB what ever ABC Note the traditional order that ensures all the options are covered And when you get on to three inputs… Binary number s

NAND gate An AND gate followed by a NOT gate ABRP A B A and B R = A and B P = NOT R A B A B That little circle turns AND into NAND

NOR gate ABRP R = A or B P = NOT R NOT A or B A B A and B A B A+B An OR gate followed by a NOT gate This little circle indicates that it’s NOT

And with three inputs… (A AND B) OR C (A OR B) AND C ABCRP R= A AND BP = R or C A B C A B C A B C ABCRP R = A OR BP = C AND R Is (A and B) and C = A and (B and C) Is (A OR B) OR C = A OR (B OR C) Draw up the truth tables and see. If two operations have the same truth table, then they must be the same: if they haven’t, they aren’t! A B C A B C AB + C (A+B)C

Understanding how these logic gates are used in programming It is all a way of turning decisions about input into binary….. eg a program with a REPEAT UNTIL loop REPEAT Bla bla bla UNTIL  condition A is TRUE OR  The end of the file is reached This can be seen on a TRUTH TABLE.. In fact it is the OR gate table Isn’t it? Is A TRUE? End reached? STOP NO YES NOYES AB P

And at A level… The exclusive OR gate EOR (one or the other but NOT both) NEOR, (an EOR gate followed by a NOT gate) Also more complicated combinations of functions and their truth tables And De Morgan’s Laws A B A B A B AB AB AB AB Not both

De Morgan’s laws These govern how we can convert Boolean expressions from one type of operation to another (A.B) = A+B (A+B) = A. B We prove these are equivalent by showing that they have the same truth tables. De Morgan’s Laws… turn ANDs into ORs and vice versa

(A.B) = A + B NOT (A AND B) is the same as NOT A OR NOT B To put it another way… A AND B is false if A is false OR B is false The Venn diagrams help us see it… the Truth tables PROVE it… A AND B NOT (A AND B) NOT A NOT B (NOT A) OR (NOT B) AND OR

(A.B) = A + B A AND B NOT (A AND B) NOT A NOT B (NOT A) OR (NOT B) AND OR We see the truth tables (final red column) are the same!!! ABA.B ABABA+B SAME

(A+B) = A. B NOT (A OR B) is the same as (NOT A) AND (NOT B) To put it another way… A OR B is false if Both A is false AND B is false Again, the Venn diagrams help us see it, but the TRUTH TABLES PROVE IT A OR B NOT (A OR B) NOT A NOT B (NOT A) AND (NOT B) OR AND

(A+B) = A. B We see the TRUTH TABLES (final red column) are the same!!! A OR B NOT (A OR B) NOT A NOT B (NOT A) AND (NOT B) ABABA.B ABA+B SAME OR AND

At A level (AS) Use de Morgan’s laws to simplify Boolean expressions Create truth tables from logic gates And vice versa Create logic circuits from descriptions of systems. There is a selection of worksheets and exam questions here on KEATS for you to try….