Logic Gates Informatics INFO I101 February 3, 2003 John C. Paolillo, Instructor.

Slides:



Advertisements
Similar presentations
Modular Combinational Logic
Advertisements

Combinational Circuits
EET 1131 Unit 7 Arithmetic Operations and Circuits
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
Chapter 4 Gates and Circuits.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Homework Reading Machine Projects Labs
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Chapter 1 The Big Picture. QUIZ 2 5 Explain the abstractions we normally apply when using the following systems: DVD player Registering for classes on.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Gates Combinational Circuits
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
Chapter 4 Gates and Circuits.
Logical Circuit Design Week 5: Combinational Logic Circuits Mentor Hamiti, MSc Office ,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Binary Numbers.
1 Introduction to Abstract Mathematics Applications : Digital Logic Circuits 2.4 and Number Systems 2.5 Instructor: Hayk Melikya
©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude.
Logic Gates II Informatics INFO I101 February 5, 2003 John C. Paolillo, Instructor.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Logic Gates. Transistors as Switches ¡EB voltage controls whether the transistor conducts in a common base configuraiton. ¡Logic circuits can be built.
Basic Arithmetic (adding and subtracting)
Logic and Digital System Design - CS 303
Digital Electronics. Introduction to Number Systems & Codes Digital & Analog systems, Numerical representation, Digital number systems, Binary to Decimal.
CPS120: Introduction to Computer Science
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
The Digital Logic Level
Combinational Logic By Taweesak Reungpeerakul
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Basic Arithmetic (adding and subtracting)
Apr. 3, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 3: Review of Digital Circuits and Logic Design Jeremy R. Johnson Mon. Apr.
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
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.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
Computing Systems Designing a basic ALU.
DIGITAL CIRCUITS David Kauchak CS52 – Fall 2015.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
5 - Digital Logic with Boolean Algebra
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES.
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Fundamentals of Computer Science Combinational Circuits.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
1’S COMPLEMENT REPRESENTATION 1’s complement of a number (binary) is obtained by changing all 1’s to 0 and all 0’s to 1. If one of these numbers is positive.
More on Digital Logic Devices and Circuits Trac D. Tran ECE Department The Johns Hopkins University Baltimore, MD
L OGIC G ATES Computer Organization – week 3. W HAT ’ S ALU? 1. ALU stands for: Arithmetic Logic Unit 2. ALU is a digital circuit that performs Arithmetic.
Hoda Roodaki Boolean Algebra Hoda Roodaki
Combinational Circuits
Logic Gates and Boolean Algebra
Basics Combinational Circuits Sequential Circuits
Number Systems Decimal (base 10) { }
Logic Gates.
Boolean Algebra.
Week 7: Gates and Circuits: PART II
Digital Logic.
Digital Logic.
COMS 361 Computer Organization
Logic Gates.
Logic Circuits I Lecture 3.
XOR Function Logic Symbol  Description  Truth Table 
Presentation transcript:

Logic Gates Informatics INFO I101 February 3, 2003 John C. Paolillo, Instructor

Items for Today Last week –Digitization –Graphic, audio and video data sizes This time –Digital logic, Boolean algebra, and circuits –Logic gates and truth tables

A Fundamental Unity Set Theory &Logic Union Intersection Complement Boolean Algebra OR AND NOT Electric Circuits Parallel Series Inversion Binary Arithmetic Addition Multiplication Twos Complement

Electric Circuits +offon off on  offon off onoffon Parallel Series

Binary Arithmetic  Means zero, carry 1 (two distinct outputs)

Boolean Algebra  OR AND  Exclusive OR Binary addition: ExOR (for one’s place) plus AND (for carry)

A Fundamental Unity Any logical or mathematical problem may be formulated in set theoretic terms Boolean logic may be used to represent any set- theoretic operation The fundamental elements of Boolean logic may be implemented in electric circuits Therefore, any logical or mathematical problem may be implemented in electrical circuits!

Logic Gates

What are Logic Gates? Logic gates are conventional arrangements of switches that are treated as units They abstract away from the details of individual switches –They may be implemented in any number of ways –Only their function is important

Symbols for Logic Gates AND ORXOR NotBuff

Functions of Logic Gates and or xor nand nor xnor A¬A ABuff 11 00

Boolean Logic Hints AND: if you know that one input is 0, it doesn’t matter what the other input is, the output will be 0 OR: if you know that one input is 1, it doesn’t matter what the other input is, the output will always be 1 XOR: if you know that the inputs are the same, then the output will always be 0

Some Example Circuits

XOR E A0101A0101 B0011B0011 C0111C0111 D1110D1110 E0110E0110 D A C B

De Morgan’s Law (1) E A0101A0101 B0011B0011 C1010C1010 D1100D1100 E0111E0111 A C B D

De Morgan’s Law (2) A0101A0101 B0011B0011 C1010C1010 D1100D1100 E0001E0001 E B D A C

Encoding Position in a 2-by-2 Board r1 r2 c1c2 row col black red

r1 r2 c1c2 col row Decoding Position to a 2-by-2 Board

4-line multiplexer d c b a C A0101A0101 B0011B0011 CabcdCabcd AB

4-line demultiplexer AB A0101A0101 B0011B0011 a IN 0 b 0 IN 0 c 0 IN 0 d 0 IN d c b a

Other Applications of Boolean Logic

Graphic Paint/Copy Modes COPYORXOR

Database Search Queries A keyword represents the set of documents containing it Boolean AND represents the intersection of the sets corresponding to two (or more) search terms Boolean OR represents the union of the sets corresponding to two (or more) search terms

Addition: Half Adder S A B xor and C The half adder sends a carry, but can’t accept one +

Addition: Truth Tables CI 0 1 A A B B SCO S S

Addition: Full Adder A B S CO CI

More Digits Full Adder ci co s abab a0 s0 b0 Full Adder ci co s abab a1 s1 b1 Full Adder ci co s abab a2 s2 b2 Full Adder ci co s abab a3 s3 b3 Full adders can be cascaded

Subtraction Complement Representations

Subtraction – –0100 Subtraction is asymmetrical That makes it harder We have to borrow sometimes

Solution: “Easy Subtraction” 456 – – Subtraction is easy if you don’t have to borrow i.e. if all the digits of the minuend are greater than (or equal to) all those of the subtrahend This will always be true if the minuend is all 9’s: 999, or , or etc.

How can we use easy subtraction? Subtract the subtrahend from 999 (or whatever we need) (easy) Add the result to the minuend (easy enough) Add 1 (easy) Subtract 1000 (not too hard) Difference = Minuend – Subtrahend + 1 – 1000 This works for binary as well as decimal

Subtraction Example – ????????? – This is the same as inverting each bit – Regular addition Add one Now drop the highest bit (easy: it’s out of range)

Subtraction Procedure Invert each bit Regular addition Add one Now drop the highest bit (easy: it’s out of range) Each of these steps is a simple operation we can perform using our logic circuits Bitwise XOR Cascaded Adders Add carry bit Drop the highest bit (overflows)

Negative Numbers Invert each bit Add one These steps make the negative of a number in twos-complement notation Twos complements can be added to other numbers normally Positive numbers cannot use the highest bit (the sign bit) This is the normal representation of negative numbers in binary

Counting etc – – – – – – – – – –10 etc.

Representations The number representation you use (encoding) affects the way you need to do arithmetic (procedure) This is true of all codes: encoding (representation) affects procedure (algorithm) Good binary codes make use of properties of binary numbers and digital logic