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

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Combinational Circuits
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
1 Counter with Parallel Load Up-counter that can be loaded with external value –Designed using 2x1 mux – ld input selects incremented value or external.
EET 1131 Unit 7 Arithmetic Operations and Circuits
Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
Computer Engineering (Logic Circuits) Dr. Tamer Samy Gaafar Lec. # 2
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 4 Operations on Bits
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Number Representation (1) Fall 2005 Lecture 12: Number Representation Integers and Computer Arithmetic.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Professor Jennifer Rexford COS 217
1 CSE-221 Digital Logic Design (DLD) Lecture-1: Digital Systems & Number Systems.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
9/15/09 - L15 Decoders, Multiplexers Copyright Joanne DeGroat, ECE, OSU1 Binary additon & subtraction.
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
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
Basic Arithmetic (adding and subtracting)
Logic and Digital System Design - CS 303
CPS120: Introduction to Computer Science
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Basic Arithmetic (adding and subtracting)
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition and subtraction.
Positional Number Systems
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
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.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.
Universal college of engineering & technology. .By Harsh Patel)
08 ARTH Page 1 ECEn/CS 224 Number Representation and Binary Arithmetic.
Logic Gates Informatics INFO I101 February 3, 2003 John C. Paolillo, Instructor.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
69 Decimal (Base 10) Numbers n Positional system - each digit position has a value n 2534 = 2*1, * *10 + 4*1 n Alternate view: Digit position.
CPS3340 Computer Architecture Fall Semester, 2013
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Digitization Informatics INFO I101 January 26, 2004 John C.Paolillo.
COMBINATIONAL LOGIC.
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
Two’s and one’s complement arithmetic CLOCK ARITHMETIC.
Number Representation (Part 2) Computer Architecture (Fall 2006)
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
ECE 3110: Introduction to Digital Systems Signed Number Conversions and operations.
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)
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.
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
Programming for GCSE Topic 9.2: Circuits for Adding T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science Queen.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Arithmetic Circuits I. 2 Iterative Combinational Circuits Like a hierachy, except functional blocks per bit.
More on Digital Logic Devices and Circuits Trac D. Tran ECE Department The Johns Hopkins University Baltimore, MD
Lecture 4: Digital Systems & Binary Numbers (4)
Chapter 4 Operations on Bits.
Data Representation – Chapter 3
COMS 361 Computer Organization
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
Presentation transcript:

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

Items for Today Last time –Logic Circuits –Applications of Boolean Logic This time –More Circuits –Addition and subtraction –Two’s complement representation –Color

Quiz Answers and (1) or (2) C A B Exclusive OR (XOR) xor (3)

Quiz: 10 minutes Take out a sheet of paper Write you name on it and date it Answer the following questions (next slide)

Quiz Questions (1)Give the truth table for Boolean AND (2)Give the truth table for Boolean OR (3)What does the following circuit do? Give a truth table for it, and name the logic gate it corresponds to. C A B

Graphic Paint/Copy Modes COPYORXOR

Arithmetic Addition and Subtraction

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

Addition: Full Adder A B S CO CI

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

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 – –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

Color (review)

The Eight-Color Computer Eight colors: black, yellow, magenta, red, cyan, green, blue, white Three color tubes on a TV monitor: Red, Green, Blue 2 3 =8 Additive color relations: red+green+blue=white

Color Perception 3 Electron guns, aimed at 3 different colors of phosphor dots 3 types of retinal sensor cells, sensitive to 3 different bands of light

Color: Response Patterns red cones green cones blue cones Wavelength 

Color: Neural Encoding Wavelength  110 RGB