School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor 019-3806067 1 DKT 122/3 - DIGITAL SYSTEM I Chapter.

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

Appendix 1 Number Systems Objectives: Review of number systems and radix conversion methods Review of binary, octal, hexadecimal and BCD unsigned codes.
Chapter 1 Digital Systems and Numbers System
Figure 2–1 Illustration of a simple binary counting application. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper.
Chapter 2 : Number System
CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
ECE 331 – Digital System Design
Digital Fundamentals Floyd Chapter 2 Tenth Edition
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Number System and Codes
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
Arithmetic Operations and Circuits
Number Systems and Arithmetic
© Copyright 2000 Indiana University Board of Trustees Proficiency Quiz Study Guide Note: The following slides are provided courtesy of Dr. Bob Orr (Computer.
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Data Representation – Binary Numbers
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
ECE 331 – Digital System Design
Number systems, Operations, and Codes
Number Systems and Codes
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
AEEE2031 Data Representation and Numbering Systems.
Number Systems & Operations
SAK Chapter 21 Chapter 2 : Number System 2.1 Decimal, Binary, Octal and Hexadecimal Numbers 2.2 Relation between binary number system with other.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Introduction To Number Systems Binary System M. AL-Towaileb1.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
IT1004: Data Representation and Organization Negative number representation.
CPEN Digital Logic Design Binary Systems Spring 2004 C. Gerousis © Digital Design 3 rd Ed., Mano Prentice Hall.
Introduction to Digital Electronics Lecture 2: Number Systems.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
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.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Unit 1 Introduction Number Systems and Conversion.
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Number Systems and Binary Arithmetic
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
CSE 102 Introduction to Computer Engineering
Chapter 3 Data Representation
Number Systems.
Number Systems and Binary Arithmetic
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Data Representation in Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
ECE 301 – Digital Electronics
Presentation transcript:

School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter 2a: Number Systems Operation and Codeds

School of Computer and Communication Engineering, UniMAP 2 1.0Number & Codes Digital and analog quantities Decimal numbering system (Base 10) Binary numbering system (Base 2) Hexadecimal numbering system (Base 16) Octal numbering system (Base 8) Number conversion Binary arithmetic 1’s and 2’s complements of binary numbers Signed numbers Arithmetic operations with signed numbers Binary-Coded-Decimal (BCD) Digital codes

School of Computer and Communication Engineering, UniMAP Introduction to Numbering Systems 3 We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are: Binary  Base 2 Octal  Base 8 Hexadecimal  Base 16

School of Computer and Communication Engineering, UniMAP Number Systems 4 Decimal Binary Octal Hexadecimal  0 ~ 9  0 ~ 1  0 ~ 7  0 ~ F

School of Computer and Communication Engineering, UniMAP 5 DECIMAL NUMBERS

School of Computer and Communication Engineering, UniMAP Binary Number System 6 Also called the “Base 2 system” The binary number system is used to model the series of electrical signals computers use to represent information 0 represents the no voltage or an off state 1 represents the presence of voltage or an on state

School of Computer and Communication Engineering, UniMAP 7 Binary Numbering Scale Base 2 NumberBase 10 EquivalentPowerPositional Value

School of Computer and Communication Engineering, UniMAP 8 Figure 2–1 Illustration of a simple binary counting application. Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. COUNTING IN BINARY

School of Computer and Communication Engineering, UniMAP 9 EXAMPLE 2-1 Convert the binary whole number (base 2) to decimal (base 10)

School of Computer and Communication Engineering, UniMAP Binary to Decimal Conversion Convert ( ) 2 to its decimal equivalent: Binary Positional Values x x x xx x x x Products

School of Computer and Communication Engineering, UniMAP 11 Exercise 2-1 Convert the fractional binary number to decimal

School of Computer and Communication Engineering, UniMAP 12 Number Conversion Any Radix (base) to Decimal Conversion

School of Computer and Communication Engineering, UniMAP 13 Number Conversion Binary to Decimal Conversion

School of Computer and Communication Engineering, UniMAP 14 Number Conversion Sum of weights method Decimal to Any Radix (Base) Conversion 1. INTEGER DIGIT: Repeated division by the radix & record the remainder 2. FRACTIONAL DECIMAL: Multiply the number by the radix until the answer is in integer

School of Computer and Communication Engineering, UniMAP 15 Example 2-2 Convert the to Binary

School of Computer and Communication Engineering, UniMAP Answer example2.2: - Repeated Division by 2 method 2 5 = = = = = MSBLSB = Remainder

School of Computer and Communication Engineering, UniMAP Answer example2.2: - Fractional Numbers Carry x 2 = x 2 = x 2 = x 2 = The Answer: MSBLSB

School of Computer and Communication Engineering, UniMAP 18 Exercise 2-2 Convert the following decimal numbers (base 10) to Binary (base 2) (a) 19 (b) 45

School of Computer and Communication Engineering, UniMAP 19 BINARY ARITHMETIC  Binary Addition  Binary Substraction  Binary Multiplication  Binary Division

School of Computer and Communication Engineering, UniMAP 20 Binary Addition = 0Sum of 0 with a carry of = 1Sum of 1 with a carry of = 1 Sum of 1 with a carry of = 10Sum of 0 with a carry of 1 Example: ???

School of Computer and Communication Engineering, UniMAP 21 Example 2.3 :- (a) (b) (c) (d)

School of Computer and Communication Engineering, UniMAP Binary Subtraction = = = = with a borrow of 1 Example: ???

School of Computer and Communication Engineering, UniMAP 23 Binary Subtraction = = = = with a borrow of 1 Example 2.4: ???

School of Computer and Communication Engineering, UniMAP 24 Simple Arithmetic Addition  Example 2.5: Substraction  Example 2.6:

School of Computer and Communication Engineering, UniMAP 25 Binary Multiplication 0 X 0 = 0 0 X 1 = 0Example 2.7: 1 X 0 = X 1 = 1 X

School of Computer and Communication Engineering, UniMAP 26 Binary Division Use the same procedure as decimal division

School of Computer and Communication Engineering, UniMAP 1’s complements of binary numbers 27 Changing all the 1s to 0s and all the 0s to 1s Example 2.8: Binary number ’s complement

School of Computer and Communication Engineering, UniMAP 1’s complements of binary numbers 28 Figure 2–2 Example of inverters used to obtain the 1’s complement of a binary number. Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

School of Computer and Communication Engineering, UniMAP 2’s complements of binary numbers 29 2’s complement Example 2.9: Step 1: Find 1’s complement of the number Binary # ’s complement Step 2: Add 1 to the 1’s complement

School of Computer and Communication Engineering, UniMAP 2’s complements of binary numbers 30 Figure 2–3 Example of obtaining the 2’s complement of a negative binary number. Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

School of Computer and Communication Engineering, UniMAP 31 Signed Magnitude Numbers Sign bit 0 = positive 1 = negative 31 bits for magnitude This is your basic Integer format …

School of Computer and Communication Engineering, UniMAP Sign numbers 32 Left most is the sign bit 0 is for positive, and 1 is for negative Sign-magnitude form = +25 sign bit magnitude bits 1’s complement form The negative number is the 1’s complement of the corresponding positive number Example: +25 is is

School of Computer and Communication Engineering, UniMAP Sign numbers 2’s complement form The positive number – same as sign magnitude and 1’s complement The negative number is the 2’s complement of the corresponding positive number. Example 2.10:- Express +19 and -19 in i) sign magnitude ii) 1’s complement iii) 2’s complement

School of Computer and Communication Engineering, UniMAP DECIMAL VALUE OF SIGNED NUMBERS Sign Magnitude Example 2.10:- - Determine the decimal value of this signed binary number expressed in sign-magnitude summing the weight where there is 1s = 21 The sign bit is 1; dec no is -21

School of Computer and Communication Engineering, UniMAP DECIMAL VALUE OF SIGNED NUMBERS 1’s Complement form (example: +ve value) Example Determine the decimal value of this signed binary number expressed in 1’s compliment summing the weight where there is 1s = +23

School of Computer and Communication Engineering, UniMAP DECIMAL VALUE OF SIGNED NUMBERS 1’s Complement form (example: -ve value) - Determine the decimal value of this signed binary number expressed in 1’s compliment summing the weight where there is 1s = -24 Adding 1 to the result, the final decimal no is = -23

School of Computer and Communication Engineering, UniMAP DECIMAL VALUE OF SIGNED NUMBERS 2’s Complement form (example: +ve value) - Determine the decimal value of this signed binary number expressed in 1’s compliment summing the weight where there is 1s = +86

School of Computer and Communication Engineering, UniMAP DECIMAL VALUE OF SIGNED NUMBERS 2’s Complement form (example: -ve value) Example Determine the decimal value of this signed binary number expressed in 1’s compliment summing the weight where there is 1s = -86

School of Computer and Communication Engineering, UniMAP 39 Q & A