ECE- 1551 DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.

Slides:



Advertisements
Similar presentations
Addition and Subtraction. Outline Arithmetic Operations (Section 1.2) – Addition – Subtraction – Multiplication Complements (Section 1.5) – 1’s complement.
Advertisements

COE 202: Digital Logic Design Signed Numbers
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
ECE 331 – Digital System Design
Chapter 1 Binary Systems 1-1. Digital Systems
King Fahd University of Petroleum and Minerals
CS 151 Digital Systems Design Lecture 3 More Number Systems.
CSCI 232© 2005 JW Ryder1 Bases  = (3 * 10 2 ) + (2 * 10 1 ) + (4 * 10 0 )  = (3 * 8 2 ) + (2 * 8 1 ) + (4 * 8 0 )  = (1 * 2 3 )
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
Mantıksal Tasarım – BBM231 M. Önder Efe
Chapter 3 Data Representation part2 Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
1.6 Signed Binary Numbers.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Digital Systems and Binary Numbers
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Computer Arithmetic Nizamettin AYDIN
BINARY ARITHMETIC Binary arithmetic is essential in all digital computers and in many other types of digital systems.
Logic and Digital System Design - CS 303
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
Dale & Lewis Chapter 3 Data Representation. Data and computers Everything inside a computer is stored as patterns of 0s and 1s Numbers, text, audio, video,
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Number Systems. Why binary numbers? Digital systems process information in binary form. That is using 0s and 1s (LOW and HIGH, 0v and 5v). Digital designer.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition and subtraction.
ECE2030 Introduction to Computer Engineering Lecture 2: Number System Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Tech.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Operations on Bits Arithmetic Operations Logic Operations
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
ECE 301 – Digital Electronics Representation of Negative Numbers, Binary Arithmetic of Negative Numbers, and Binary Codes (Lecture #11) The slides included.
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
Digital Logic Lecture 3 Binary Arithmetic By Zyad Dwekat The Hashemite University Computer Engineering Department.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Chapter 1: Binary Systems
IT1004: Data Representation and Organization Negative number representation.
Introduction to Digital Electronics Lecture 2: Number Systems.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
1 CS 151 : Digital Design Chapter 4: Arithmetic Functions and Circuits 4-3 : Binary Subtraction.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
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)
Computer Math CPS120 Introduction to Computer Science Lecture 7.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Number Systems By, B. R. Chandavarkar CSE Dept., NITK, Surathkal.
Lecture 4: Digital Systems & Binary Numbers (4)
Cosc 2150: Computer Organization
Data Representation in Computer Systems
Digital Systems and Binary Numbers
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Data Representation Data Types Complements Fixed Point Representation
COMPLEMENTS Complements are used in digital computers for simplifying the subtraction operations and for logical manipulation. There are two types of complements.
Data Representation – Chapter 3
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
CPS120: Introduction to Computer Science
ECE 331 – Digital System Design
Chapter3 Fixed Point Representation
Chapter 1 (Part c) Digital Systems and Binary Numbers
Presentation transcript:

ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016

Number with Different Bases: Summary

Arithmetic Operations in Binary Number System Addition Subtraction Multiplication

Arithmetic Operations  Addition Augend: Addend:  Substraction Minuend: Subtrahend:

Arithmetic Operations  Multiplication 1011 X x 1011xx X 11 =? 101 X 111 = ?

Division Operation  110 ÷ 11 = 10  110 ÷ 10 = 11  1100 ÷ 100 =?

Examples: Arithmetic Operations  Perform binary subtractions a)11 – 01 b)11 – 10 c)101 – 011 (Borrow is required in this subtraction) d)011 – = (-3) How to Store negative numbers

Signed Binary Numbers  Positive integers (including zero) can be represented as unsigned numbers.  To represent negative integers, we need a notation for negative values.  A negative number is indicated by a minus sign and a positive number by a plus sign.  hardware limitations, computers must represent everything with binary digits.  The convention is to have a sign bit, where the sign bit is 0 for positive and 1 for negative.  Note:  If the binary number is signed, then the leftmost bit represents the sign and the rest of the bits represent the number. Also known as signed ‐ magnitude convention  If the binary number is unsigned, then the leftmost bit is the most significant bit of the number.  Example:  The string of bits can be considered as 9 (unsigned binary) or as +9 (signed binary)  The string of bits represents the binary equivalent of 25 (unsigned number) and the binary equivalent of -9 as a signed number.

Signed Binary Numbers: signed complement system  When arithmetic operations are implemented in a computer, it is more convenient to use a different system, referred to as the signed complement system, for representing negative numbers.  A negative number is indicated by its complement.  The signed ‐ complement system negates a number by taking its complement. Whereas the signed ‐ magnitude system negates a number by changing its sign bit.

Signed Binary Numbers

COMPLEMENTS OF NUMBERS Radix Complement Diminished Radix Complement

COMPLEMENTS OF NUMBERS Complements are used in digital computers to simplify the subtraction operation and for logical manipulation. Simplifying operations leads to simpler, less expensive circuits to implement the operations.  There are two types of complements for each base ‐ r system: the radix complement and the diminished radix complement.  Diminished Radix Complement: Referred as the (r - 1)’s complement  Given a number N in base r having n digits, the (r - 1)’s complement of N, i.e., its  Diminished radix complement, is defined as (r n - 1) - N.  Radix Complement: referred to as the r’s complement  The r’s complement of an n ‐ digit number N in base r is defined as r n - N for N ≠ 0 and as 0 for N = 0.

COMPLEMENTS OF NUMBERS: Diminished radix Complement  Given a number N in base r having n digits, the (r - 1)’s complement of N, i.e., its  Diminished radix complement, is defined as (r n - 1) - N.  Decimal Number System:  For decimal numbers, r = 10 and r - 1 = 9, so the 9’s complement of N is (10 n - 1) – N  In this case 10 n represents a number consisting of 1 followed by n 0’s. Thus number is n 9’s  For example, if n = 4, we have 104 = 10,000 and =  Example 9’s complement of is = is =  Example for Binary numbers 1’s complement of is is

COMPLEMENTS OF NUMBERS: Radix Complement  The r’s complement of an n ‐ digit number N in base r is defined as r n - N for N ≠ 0 and as 0 for N = 0.  Comparing with the (r - 1)’s complement, we note that the r’s complement is obtained by adding 1 to the (r - 1)’s complement.  since r n - N = [(r n - 1) - N] + 1.  Example: 10’s complement of decimal 2389  Example: 2’s complement of binary is =7611

Arithmetic Operations with Complements of Numbers  when subtraction is implemented with digital, the borrow a 1 method from a higher significant position is less efficient than the method that uses complements.  The subtraction of two n ‐ digit unsigned numbers M - N in base r can be done as  follows: 1. Add the minuend M to the r’s complement of the subtrahend N. Mathematically, M + (r n - N) = M - N + r n. 2. If M ≥ N, the sum will produce an end carry r n, which can be discarded; what is left is the result M - N. 3. If M ≤ N, the sum does not produce an end carry and is equal to r n - (N - M), which is the r’s complement of (N - M). To obtain the answer in a familiar form, take the r’s complement of the sum and place a negative sign in front.

Subtractions with Complements Using 10’s complement, subtract Note that M has five digits and N has only four digits. Both numbers must have the same number of digits M = ’s complement of N = Sum = Discard end carry 10 5 = Answer = 69282

Example  Using 10’s complement, subtract  Given the two binary numbers X = and Y = , perform the subtraction (a) X - Y and (b) Y - X by using 2’s complements.

Arithmetic Operations: Addition and Subtraction  Note that negative numbers must be initially in 2’s ‐ complement form and that if the sum obtained after the addition is negative, it is in 2’s ‐ complement form. For example, -7 is represented as , which is the 2s complement of +7

Arithmetic Operations: Addition and Subtraction  In each of the four cases, the operation performed is addition with the sign bit included. Any carry out of the sign ‐ bit position is discarded, and negative results are automatically in 2’s ‐ complement form.

Arithmetic Operations: Other Considerations  Other considerations include:  Ensure that the result has a sufficient number of bits to accommodate the sum.  If we start with two n ‐ bit numbers and the sum occupies n + 1 bits, we say that an overflow occurs.  Overflow is a problem in computers because the number of bits that hold a number is finite, and a result that exceeds the finite value by 1 cannot be accommodated

Decimal value of the signed numbers  Determine the decimal value of the signed binary number expressed in sign-magnitude Ans = -21  Determine the decimal values of the signed binary number expressed in 1’s complement. a) b)  Summing the weight where there are 1’s = +23 b) Summing the weight where there are 1’s = -24 Adding 1 to the result, the final decimal number is = -23

Decimal value of the signed numbers  Determine the decimal values of the signed binary number expressed in 2’s complement. a) b)  = ( ) Summing the weight where there are 1’s = +86 b) = ( ) = Summing the weight where there are 1’s = -86 c) Determine the decimal value of 2’s complement number

Next Class  Binary Logic  Digital Logic  Binary Codes  BCD- Binary coded decimal Code  Decimal Arithmetic  Grey Code  ASCII code  Error correction/Error detection  Binary storage and Registers