Number systems, Operations, and Codes

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

Chapter Chapter Goals Know the different types of numbers Describe positional notation.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Converting Binary to Octal
Number Systems and Arithmetic
Binary Numbers.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Number Systems.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
Conversion of Number System Conversion Among Bases The possibilities: Hexadecimal DecimalOctal Binary
Integer Conversion Between Decimal and Binary Bases Conversion of decimal to binary more complicated Task accomplished by –Repeated division of decimal.
NUMBER SYSTEM.
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,
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Digital Electronics Octal & Hexadecimal Number Systems.
Number System sneha.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Chapter 2 Number Systems Consists of a set of symbols called digits and a set of relations such as +, -, x, /.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Octal & Hexadecimal Number Systems
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
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.
Computer Number System
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
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.
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Fall’ 2014 Number System CSE Number System How Computers Represent Data Binary Numbers The Binary Number System Bits and Bytes Text Codes Binary.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
Some basic concepts underlying computer archi­tecture
Introduction To Number Systems
Digital Logic & Design Adil Waheed Lecture 02.
Digital Design Chapter One Digital Systems and Binary Numbers
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
By: Jonathan O. Cabriana
CHAPTER 1 : INTRODUCTION
Number Systems.
Digital Electronics Number Systems and Codes
Writer:-Rashedul Hasan. Editor:- Jasim Uddin
Location in course textbook
Chapter 3 Data Representation
Binary Number System And Conversion
Number System conversions
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Number Systems and Binary Arithmetic
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Binary Number System And Conversion
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
Chapter 2: Number Systems
Chapter 2 Number Systems.
Binary to Decimal Conversion
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Binary Number System And Conversion
Introduction To Number Systems
Chapter 2 Number Systems.
Presentation transcript:

Number systems, Operations, and Codes 1- Decimal Numbers The decimal number system has ten digits . These are : 0 , 1 , 2 , 3, 4 , 5 , 6 , 7 , 8 , 9 . The decimal number system has the base = 10 Example -1- Example -2- Example -3- : Express the decimal number 897.9 as a sum of the value of each digit.

2- Binary Numbers The binary number system has two digits (bits) . These are : 0 , 1. The binary number system has the base = 2 The weight of a bit increases from right to left in a binary whole number

Decimal to Binary Conversion Method : To get the binary number for a given decimal number , divide decimal number by 2 until the quotient is 0 . Remainders form the binary number . Example -1- Example -2- : convert the following decimal numbers into binary : 19 - 45

Binary to Decimal Conversion Method : Add the weights of all “1”s in a binary number to get the decimal values Example -1- Example -2- Example -3- : convert the following binary numbers 10101110 , 11.011101 into decimal number ?

Convert Decimal Fraction to binary Method : Repeated multiplication by 2 until fractional part is zero Example -1- Example -2- : convert the following decimal numbers into binary : 0.375 0.559

3- Octal Numbers The Octal number system has 8 digits. These are : 0 , 1, 2 , 3, 4 , 5 , 6, 7 The Octal system has the base = 8 Assignment: How could we convert Octal to decimal ? give an example . How could we convert Decimal to Octal ? give an example . How could we convert Binary to Octal ? give an example . How could we convert Octal to Binary ? give an example .

Convert Decimal to Octal Divide the given decimal number by base 8 and write the reminders starting first reminder from right to left Example: (57)10 = (?)8 Answer: (71)8 Or using polynomial of weights, like: … 83 82 81 80 512 64 8 1 Example: (413)10 = 0 6 3 5 Where: (635)8 = 5.80 + 3.81 + 6.82 = 5.1 + 3.8 + 6.64 = 5 + 24 + 384 = (413)10

4- Hexadecimal Numbers The hexadecimal number system has 16 digits. These are : 0 , 1, 2 , 3, 4 , 5 , 6, 7 , 8 , 9, A , B , C , D , E , F The hexadecimal system has the base = 16

Convert Decimal to Hexadecimal Divide the given decimal number by base 16 and write the reminders starting first reminder from right to left Example: (57)10 = (?)16 Answer: (39)16 Or using polynomial of weights, like: … 162 161 160 256 16 1 Example: (413)10 = 1 9 D Where: (19D)16 = D.160 + 9.161 + 1.162 = 13.1 + 9.16 + 1.256 = (413)10

Convert between different Number systems Base of binary system is 2 = 21 Base of Octal System is 8 = 23 Base of Hexadecimal system is 16 = 24 It means each Hexadecimal digit ~ 4 binary digits, and each Octal digit ~ 3 binary digits Examples: Convert the binary value 110011000101100 To the corresponding Octal and hexadecimal value 110 011 000 101 100 = 63054 Octal 110 0110 0010 1100 = 662C Hexadecimal!

Hexadecimal Numbers (cont.) Binary to hexadecimal Method: Break the binary number into 4-bit groups starting at the right-most bit , Then: Replace each 4-bit group with the equivalent hexadecimal symbol.

Hexadecimal Numbers (cont.) hexadecimal to Binary Method : Replace each hexadecimal symbol with the appropriate four bits.

Hexadecimal Numbers (cont.) hexadecimal to Decimal Method Convert the hexadecimal to binary then convert from binary to decimal.

Hexadecimal Numbers (cont.) Decimal to hexadecimal Method : Repeated division of a decimal number by 16 .

Arithmetic Operations 1st and 2nd Complement 1st complement : Method : Invert each bit to get the 1st complement Example -1- Example -2- : Determine the first complement of the following binary 00011010 - 11110111 - 10001101 2nd complement : Method -1- : 2nd complement = 1st complement + 1 Example -1-

Arithmetic Operations 1st and 2nd Complement (cont.) Method -2- : Change all the bits to the left of the least significant 1 to gets the 2nd complement Example -1- : Determine the 2nd complement of the following binary 00010110 - 11111100 - 10010001 Application Example