1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

Combinational Circuits
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices XOR, Parity Circuits, Comparators.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
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.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
ECE 331 – Digital System Design
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
4 Operations On Data Foundations of Computer Science ã Cengage Learning.
CS 105 Digital Logic Design
NEGATIVE BINARY NUMBER – Digital Circuit 1 Choopan Rattanapoka.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
©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.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level 1 Today’s Topics How information.
NOCTI Review Lesson 4 Objectives:
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
LOGIC GATES & TRUTH TABLE – Digital Circuit 1 Choopan Rattanapoka.
Digital Logic Design Week 3
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
Gates and Logic Dr John Cowell phones off (please)
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 Positive numbers are well understood An n-bit number represents numbers from 0 to 2 n -1 n+m bits can be used to represent n-bit integer and m-bit fraction.
Addition and Substraction
EEL-3705 TPS QUIZZES Chapter 4. Quiz 4-1 Using the 2x4 Decoder shown below and two-input OR gates, design a logic circuit which implements.
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Logic: Other Gate Types
Number Representation (Part 2) Computer Architecture (Fall 2006)
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
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.
The inverter performs the Boolean NOT operation. When the input is LOW, the output is HIGH; when the input is HIGH, the output is LOW. The Inverter AX.
ELECTRICAL ENGINEERING: PRINCIPLES AND APPLICATIONS, Third Edition, by Allan R. Hambley, ©2005 Pearson Education, Inc. Chapter 7 Logic Circuits.
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
Chapter 33 Basic Logic Gates. Objectives After completing this chapter, you will be able to: –Identify and explain the function of the basic logic gates.
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.
Logic Gates and Boolean Algebra Introduction to Logic II.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Review of Boolean algebra Not is a horizontal bar above the number –0 = 1 –1 = 0 Or is a plus –0+0 = 0 –0+1 = 1 –1+0 = 1 –1+1 = 1 And is multiplication.
Combinational Circuits
De Morgan’s Theorem,.
Chapter 4 Register Transfer and Microoperations
Logic Gates.
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
Digital Signals Digital Signals have two basic states:
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
ELL100: INTRODUCTION TO ELECTRICAL ENGG.
For OCR GCSE Computing Unit 1 - Theory
EEL 3705 / 3705L Digital Logic Design
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Logic Gates.
Digital Logic.
Logic Gates.
Instructor: Alexander Stoytchev
Unit 18: Computational Thinking
13 Digital Logic Circuits.
Gates Type AND denoted by X.Y OR denoted by X + Y NOR denoted by X + Y
Instructor: Alexander Stoytchev
Multiple function unit design
Instructor: Alexander Stoytchev
CSE 370 – Winter Number syst.; Logic functions- 1
Presentation transcript:

1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative Underflow –When two negative numbers added together or a positive number subtracted from a negative number yields positive C/B A B Res CorrCorrOverUnderCorrCorrOverUnder ADD/SUB revisited

2 To change sign of a number In Sign and Magnitude –Just complement the sign 1’s Complement –Complement all bits 2’s Complement –Complement all bits and add 1 Adding 1 is expensive operation (Example: Add 1 to 0111) Alternate 2’s complement method –Scan the string from right –Retain all bits up to the first 1 –Then complement the remaining bits Negation

3 Positive numbers are well understood How to convert a negative decimal number to binary Method 1: –The magnitude of number must be less than 2 n-1 –Add -2 n-1 to the number –Convert the magnitude of this number as an n-bit string –Example -4 + (-8) = -12 (decimal) = 1100 (binary) Method 2 –Convert the magnitude to an n-bit string –Negate the number Converting negative number

4 So far we discussed arithmetic (yes, no multiply/divide) But what about a logic functions? A binary variable can be used to represent two logic value Answer to any question with two possible answers can be represented by a binary variable Examples: –Does the second section of 210 meet at 10AM? Answer represented by variable A, value A=1 (yes), value A=0 (no) –Is it worth attending class at that time? Answer represented by variable B, value B=1 (yes), value B=0 (no) So what about logic functions

5 We can combine variables to get more complex functions Functions of 1 variable XF1(X)F2(X)F3(X)F4(X) We have four possible operations upon 1 1-bit input value F1 is always 0, F2 is always 1, F3 is always X and F4 is always complement of X F4 is an important function and is called inversion It is also called NOT operation Inverse is denoted by X’ or X Functions of 1-bit variable

6 X YF0F1F2F3F4F5F6F X YF8F9F10F11F12F13F14F Functions of 2-bit variable

7 F1 is called a logical AND denoted by X.Y F6 is called an XORdenoted by X xor Y F7 is called OR denoted by X + Y F8 is NOR denoted by X + Y F14 is NAND denoted by X.Y Logic expressions allow us to implement function of binary inputs For each logic expression there is a logic gate See and practice logic circuit symbols for AND, OR, NAND, NOR, XOR, NOT… Interpretation of function

8 Basic logic circuits can be combined to get a bigger function Functions are written in truth table Each row in a truth table is one combination of logic variable Given the number of variables, n, we have 2 n different entries For example, for 1 variable there will 2 entries, for 4 variables there will be 16 entries, and so on Most circuits may have many more than 4 inputs However in class we will deal with only a few inputs For example a function of four variables could be –F = (A+B).(C+D) Combining logic circuits

9 An Example of Truth Table