MACHINE LEVEL REPRESENTATION OF DATA

Size: px
Start display at page:

Download "MACHINE LEVEL REPRESENTATION OF DATA"

Transcription

1 MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1

2 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems of other bases (binary, octal, hexadecimal) Understand signed numbers and unsigned numbers Understand number representations in two s complement Perform arithmetic operations in every base Understand the method of floating point number representation in IEEE format 2

3 Introduction NUMBERING SYSTEM : BASE DECIMAL BINARY OCTAL HEXA- DECIMAL 5 TH PLACE 4 TH PLACE 3 RD PLACE 2 ND PLACE 1 ST PLACE PLACE SINGLE UNIT 1 ST PLACE 2 ND PLACE RD PLACE 100,000 10,000 1, /10 1/100 1/ /2 1/4 1/ ,768 4, X /8 1/64 1/ ,048, X ,536 4, X /16 1/256 1/4096 3

4 Arithmetic Operations in Different Number Bases The following table shows the equivalent values for decimal numbers in binary, octal and hexadecimal: DECIMAL BINARY OCTAL HEXADECIMAL A B C D E F 4

5 Number Bases Radix : when referring to binary, octal, decimal, hexadecimal, a single lowercase letter appended to the end of each number to identify its type. E.g. hexadecimal 45 will be written as 45h octal 76 will be written as 76o or 76q binary will be written as b 5

6 Number Bases Decimal system: system of positional notation based on powers of 10. Binary system: system of positional notation based powers of 2 Octal system: system of positional notation based on powers of 8 Hexadecimal system: system of positional notation based on powers of 16 6

7 Why Binary? Early computer design was decimal Mark I and ENIAC John von Neumann proposed binary data processing (1945) Simplified computer design Used for both instructions and data Natural relationship between on/off switches and calculation using Boolean logic On Off True False Yes No 1 0 7

8 Binary Numbers A computer stores both instructions and data as individual electronic charges. represent these entities with numbers requires a system geared to the concept of on and off or true and false Binary is a base 2 numbering system each digit is either a 0 (off) or a 1 (on) Computers store all instructions and data as sequences of binary digit e.g = ABC 8

9 Binary Numbers Bit : each digit in a binary number Byte : consists of 8 bits which is the basic unit of storage on nearly all computers Each location in the computer s memory holds exactly 1 byte or 8 bits. A byte can hold a single instruction, a character or a number A Word : which is 16 bits or 2 bytes long : byte word byte A 16-bit computer : its instructions can operate on 16-bit quantities 9 bit

10 Numeric Data Representation FOR DECIMAL 43 = 4 x x s place 1 s place Place Value 10 1 Evaluate 4 x 10 3 x1 Sum

11 Numeric Data Representation FOR DECIMAL 527 = 5 x x x s place 10 s place 1 s place Place Value Evaluate 5 x x 10 7 x1 Sum

12 Numeric Data Representation = s place 8 s place 1 s place Place Value Evaluate 6 x 64 2 x 8 4 x 1 Sum for Base

13 Numeric Data Representation 6, = 26, ,096 s place 256 s place 16 s place 1 s place Place Value 4, Evaluate 6 x 4,096 7 x x 16 4 x 1 Sum for Base 10 24,576 1,

14 Numeric Data Representation = Place Value Evaluate 1 x x 64 0 x 32 1 x16 0 x 8 1 x 4 1 x 2 0 x 1 Sum for Base

15 Base or Radix Base: The number of different symbols required to represent any given number The larger the base, the more numerals are required Base 10 : 0,1, 2,3,4,5,6,7,8,9 Base 2 : 0,1 Base 8 : 0,1,2, 3,4,5,6,7 Base 16 : 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F 15

16 Number of Symbols vs Number of Digits For a given number, the larger the base the more symbols required but the fewer digits needed Example #1: Example #2: 11C

17 Numeric Conversion between Number Bases Decimal Other bases Other bases Decimal Binary Octal Binary Hexadecimal Octal Binary Hexadecimal Binary 17

18 CONVERSION : DECIMAL OTHER BASES 18

19 From Base 10 to Base 2 Base Remainder Quotient 2 ) 42 ( 0 Least significant bit 2 ) 21 ( 1 2 ) 10 ( 0 2 ) 5 ( 1 2 ) 2 ( 0 2 ) 1 ( 1 Most significant bit 0 Base

20 From Base 10 to Base 2 Convert to binary = 18 balance 1 (LSB) 18 2 = 9 balance = 4 balance = 2 balance = 1 balance = 0 balance 1 (MSB) Therefore, = * MSB (most-significant-bit) : left most bit LSB (least-significant-bit) : right most bit 20

21 From Base 10 (decimal point) to Base 2 What is the value of in binary? Steps : 1. Convert the integer to binary by using method shown in previous slide. 2. Convert the decimal point to binary by using the following method X 2 (MSB) X X X 2 (LSB) The 1 is saved as result, then dropped and the process repeated So, (0.6875) 10 = (0.1011) 2 ; Therefore, =

22 From Base 10 to Base 8 Base Remainder Quotient 8) 135 ( 7 Least significant bit 8) 16 ( 0 8) 2 ( 2 Most significant bit 0 Base

23 From Base 10 (decimal point) to Base 8 Convert to octal x Therefore, =

24 From Base 10 (decimal point) to Base 8 Convert to octal. (OTHER METHOD) 21 2 = 10 balance 1 (LSB) 10 2 = 5 balance = 2 balance = 1 balance = 0 balance 1 (MSB) So, = Therefore, Refer to conversion of binary to hexadecimal = = Now, 0.25 X 2 (MSB) X 2 (LSB) So, =

25 From Base 10 to Base 16 Base 10 5,735 Remainder Quotient 16 ) 5,735 ( 7 Least significant bit 16 ) 358 ( 6 16 ) 22 ( 6 16 ) 1 ( 1 Most significant bit 0 Base

26 From Base 10 to Base 16 Base 10 8,039 Remainder Quotient 16 ) 8,039 ( 7 Least significant bit 16 ) 502 ( 6 16 ) 31 ( ) 1 ( 1 Most significant bit 0 Base 16 1F67 26

27 From Base 10 to Base 16 Convert to hexadecimal = 1 balance 5 (LSB) 1 16 = 0 balance 1 (MSB) Therefore, =

28 From Base 10 (decimal point) to Base 16 Convert to hexadecimal x Therefore, =

29 From Base 10 (decimal point) to Base 16 Convert to hexadecimal. (OTHER METHOD) 21 2 = 10 balance 1 (LSB) 10 2 = 5 balance = 2 balance = 1 balance = 0 balance 1 (MSB) So, = Therefore, Refer to conversion of binary to hexadecimal = = Now, 0.25 X 2 (MSB) X 2 (LSB) So, =

30 CONVERSION : OTHER BASES DECIMAL 30

31 From Base 2 to Base 10 Convert to decimal *32 1*4 1* = = (1 X 2 5 ) + (0 X 2 4 ) +(0 X 2 3 ) +(1 X 2 2 ) + (1 X 2 1 ) + (0 X 2 0 ) = = Therefore, =

32 From Base 16 to Base 10 Convert E5 16 to decimal. E *16 5* = E5 16 = (E X 16 1 ) + (5 X 16 0 ) = (14 X 16) + (5 X 1) = = Therefore, E5 16 =

33 From Base 16 (decimal point) to Base 10 Convert E5.A8 16 to decimal. E 5. A *16 5*1. 10* * =

34 From Base 16 (decimal point) to Base 10 Convert E5.A8 16 to decimal. (OTHER METHOD) 1. Firstly convert the number into binary, Hex E 5. A 8 Binary From Example 15: E5 16 = Now, ( ) 2 = (1 X 2-1 ) + (0 X 2-2 ) + (1 X 2-3 ) + (0 X 2-4 ) + (1 X 2-5 ) + (0 X 2-6 ) + (0 X 2-7 ) + (0 X 2-8 ) = 1/2 + 1/ /2 5 = 1/2 + 1/8 + 1/32 = = ( ) 10 Therefore, E5.A8 16 =

35 From Base 8 to Base 10 Convert to decimal *512 2*64 6*8 3* =

36 From Base 8 to Base = 3, (OTHER METHOD) 7 x = 58 x = 470 x = 3,763 36

37 From Base 8 (decimal point) to Base 10 Convert to decimal *8 6*1. 3* * =

38 CONVERSION : BINARY HEXADECIMAL BINARY OCTAL 38

39 From Base 16 to Base 2 The nibble approach Hex easier to read and write than binary Why hexadecimal? Modern computer operating systems and networks present variety of troubleshooting data in hex format The relationship between BINARY and HEXADECIMAL 1 digit hexadecimal is EQUIVALENT to 4 bits binary Base 16 1 F 6 7 Base

40 From Base 16 to Base 2 Method: Get the binary representation for the hexadecimal number. Example: Convert F1 16 to binary. F1 16 = F F1 16 =

41 From Base 16 to Base 2 (decimal point) Method: Get the binary representation for the hexadecimal number. Example: Convert 2A.5C 16 to binary. 2A.5C 16 = 2 A. 5 C A.5C 16 =

42 From Base 2 to Base 16 Method: Find the hexadecimal representation for the GROUP of 4 binary numbers. Example: Convert to hexadecimal number = =

43 From Base 2 to Base 16 (decimal point) Method: Find the hexadecimal representation for the GROUP of 4 binary numbers. Use the decimal point as your STARTING point. Example: Convert to hexadecimal number = E = 3E

44 From Base 8 to Base 2 The relationship between BINARY and OCTAL 1 digit octal is EQUIVALENT to 3 bits binary Base Base

45 From Base 8 to Base 2 Method: Get the binary representation for every digit in the octal number. Example 17: Convert 53 8 to binary = =

46 From Base 8 to Base 2 (decimal point) Method: Get the binary representation for every digit in the octal number. Example 17: Convert to binary = =

47 From Base 2 to Base 8 Method: Find the octal representation for the GROUP of 3 binary numbers. Example: Convert to octal number = =

48 From Base 2 to Base 8 (decimal point) Method: Find the octal representation for the GROUP of 3 binary numbers. Use the decimal point as your STARTING point. Example: Convert to octal number = =

49 ADDITION AND SUBTRACTION OF DIFFERENT BASES 49

50 Addition Base Problem Largest Single Digit Decimal Octal Hexadecimal Binary F 1 50

51 Addition and Subtraction of Binary Numbers Example ADD Example SUB

52 Addition of Octal Numbers Example ADD = 9 8 = = 11 8 = = 8 8 = = 1 52

53 Subtraction of Octal Numbers Example SUB = = = 1 53

54 Addition of Hexadecimal Numbers Example ADD 1 1 A = 11 = B + 7 C = B = = = 9 54

55 Subtraction of Hexadecimal Numbers Example SUB E F 7 D = 15 = F - 9 E = 13 = D 2 E D F E 0 = E 2 0 = 2 55

56 THE ALPHANUMERIC REPRESENTATION 56

57 The Alphanumeric Representation The data entered as characters, number digits, and punctuation are known as alphanumeric data. 3 alphanumeric codes are in common use. ASCII (American Standard Code for Information Interchange) Unicode EBCDIC (Extended Binary Coded Decimal Interchange Code). 57

58 The Alphanumeric Representation The following tables show the comparisons between the ASCII code in binary and hexadecimal for the given characters. Character Binary Hex A B C D E F G H I J A K B Space Full stop E ( B $

59 THE DECIMAL REPRESENTATION 59

60 The Decimal Representation BCD (Binary Coded Decimal) is often used to represent decimal number in binary. Decimal BCD

61 SIGNED AND UNSIGNED NUMBERS 61

62 Signed and Unsigned Numbers Binary numbers may either signed or unsigned Oddly, CPU performs arithmetic and comparison operations for both type equally well, without knowing which type it s operating on. An unsigned numbers : numbers with only positive values for 8-bit storage location : store unsigned integer value between for 16-bit storage location : store unsigned integer value between Unsigned number can be converted directly to binary numbers and processed without any special care 62

63 Signed and Unsigned Numbers For negative numbers, there are several ways used to represent it in binary form, depending on the process take place : i. Sign-and-magnitude representation ii. 1 s complement representation iii. 2 s complement representation 63

64 Sign-and-Magnitude In daily usage, signed integers are represented by a plus or minus sign and a value. In the computer, the uses of 0 s and 1 s take place. 0 : plus ( positive) 1 : minus (negative) The leftmost bit in a binary number is considered the sign bit. The remaining (n-1) bits are used for magnitude. 64

65 Sign-and-Magnitude Example 1 : (+37) (-37) (+1) (-1) (+32767) (-32767) 65

66 Sign-and-Magnitude Example 2 : What is the sign-and-magnitude representation of the decimal numbers 31 and +31 if the basic unit is a byte? = Unit is a byte = 8 bits +31 = =

67 Sign-and-Magnitude Example 3 : What is the sign-and-magnitude representation of the decimal numbers 31 and +31 if the basic unit is a word? = Unit is a word= 16 bits +31 = =

68 Sign-and-Magnitude Example 4 : What is the decimal equivalent value of the sign-and -magnitude binary sequence ? Sign is negative = =

69 Sign-and-Magnitude Addition of 2 numbers in sign-and-magnitude : using the usual conventions of binary arithmetic if both have same sign : magnitude are added and the same sign copied if the sign different : number that has smaller magnitude is subtracted from the larger one. The sign is copied from the larger magnitude. 69

70 Sign-and-Magnitude Example 5 : What is the decimal value of the sum of the binary numbers and if they are represented in sign-and-magnitude? Assume that the basic unit is the byte. Same signs : magnitude are added Sign is positive = =

71 Sign-and-Magnitude Example 6 : What is the decimal value of the sum of the binary numbers and if they are represented in sign-and-magnitude? Assume that the basic unit is the byte. Different signs : Larger magnitude - smaller magnitude Larger magnitude : Smaller magnitude : Sign is negative = =

72 1 S Complement Convention In base 2, the largest digit is 1. The 1 s complement is performed simply by changing: every 0 1 and every 1 0. Also known as inversion 72

73 2 S Complement Convention Most popular among computer manufacturers since it does not present any of the problems of the sign-and-magnitude or 1 s complement. Positive numbers : using similar procedure as sign-and-magnitude Given n bits, the range of numbers that can be represented in 2 s complement is ( (2 n )) to (2 n-1 1) (127) (0) (-1) (-128) ( 2 n-1 1) - (2 n ) Notice that the range of negative numbers is one larger than the range of the positive values 73

74 2 S Complement Convention To represent a negative number in this convention, follow the 3 steps process below: Step 1 : Express the absolute value of the number in binary Step 2 : Change all 0s to 1s and vise versa 1 s complement Step 3 : Add 1 to the binary number of step 2 Example 1 : What is the 2 s complement representation of -23? Example 2 : What is the decimal positive value of the 2 s complement number ? 74

75 2 S Complement Convention Example 1 : What is the 2 s complement representation of -23? Step: 23 in binary s (inverse) s s complement representation

76 2 S Complement Convention Example 2 : What is the decimal positive value of the 2 s complement number ? Step: 2 s complement representation s (inverse) s + 1 Decimal positive value

77 The IEEE Floating Point Representation 2 problems with integers; They can t express fractions, AND The range number is limited to the number of bits used. An efficient way of storing fractions floating point method involves splitting the fraction into two parts, an exponent and a mantissa Computer industry agreed upon a standard for the storage of floating point numbers the IEEE 754 standard; uses 32 bits of memory (single precision) or 64 bits (double precision) 77

78 The IEEE Floating Point Representation IEEE short real : 32 bits (Exponent system = excess 127) Total number of bits : Sign Biased exponent Mantissa (fraction) IEEE short real : 64 bits (Exponent system = excess 1023) Total number of bits : Sign Biased exponent Mantissa (fraction) 78

79 The IEEE Floating Point Representation Convert to the IEEE floating point format. Step 1 : convert into binary Step 2 : put into 1.xxxx X 2 y format Step 3 : get the biased exponent Step 4 : get the sign (from the question) Step 5 : identify significand and mantissa Step 6 : put into the IEEE single precision format Step 7 : convert into hexadecimal 79

80 The IEEE Floating Point Representation Convert to binary = Put into 1.xxxx X 2 y = x 2 7 Biased exponent Exponent = 7 Biased exponent = y = = 134 = (8 bits) Sign Sign = +ve (0) Significand Mantissa Significand = Mantissa = (23bits) IEEE format : IEEE format Sign Biased Exponent Mantissa (23) Hexadecimal C = 4319 C000 h 80

81 Eg: Convert -29 / The IEEE Floating Point Representation Convert to binary 29 / 128 = / 2 7 = x 2-7 Put into 1.xxxx X 2 y = x 2 4 x 2-7 = x 2-3 Biased exponent Exponent = -3 Biased exponent = y = (-3) = 124 = (8 bits) Sign Sign = -ve = 1 Significand Mantissa Significand = Mantissa = (23bits) IEEE format : IEEE format Sign Biased Exponent Mantissa (23) Hexadecimal B E = BE h 81

82 The IEEE Floating Point Representation Convert C2F in IEEE floating point format to the decimal number. Step 1 : in hexadecimal Step 2 : convert into binary Step 3 : put into the IEEE single precision format Step 4 : get biased exponent Step 5 : get the sign Step 6 : identify significand and mantissa Step 7 :put into 1.xxxx X 2 y Step 8 : identify actual number 82

83 The IEEE Floating Point Representation In hexadecimal C2F Convert to binary C 2 F Put into IEEE format Get the biased exponent Sign Mantissa Significand Put into 1.xxxx X 2 y IEEE format : Sign Biased Exponent Mantissa (23) Biased Exponent:: = 133 Exponent : = 6 1 = -ve x 2 6 = = The actual number

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1 IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose

More information

COMP Overview of Tutorial #2

COMP Overview of Tutorial #2 COMP 1402 Winter 2008 Tutorial #2 Overview of Tutorial #2 Number representation basics Binary conversions Octal conversions Hexadecimal conversions Signed numbers (signed magnitude, one s and two s complement,

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted

More information

CHW 261: Logic Design

CHW 261: Logic Design CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER

More information

BINARY SYSTEM. Binary system is used in digital systems because it is:

BINARY SYSTEM. Binary system is used in digital systems because it is: CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System

More information

Computer Organization

Computer Organization Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,

More information

Final Labs and Tutors

Final Labs and Tutors ICT106 Fundamentals of Computer Systems - Topic 2 REPRESENTATION AND STORAGE OF INFORMATION Reading: Linux Assembly Programming Language, Ch 2.4-2.9 and 3.6-3.8 Final Labs and Tutors Venue and time South

More information

Chapter 1 Review of Number Systems

Chapter 1 Review of Number Systems 1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits

More information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(

More information

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

10.1. Unit 10. Signed Representation Systems Binary Arithmetic 0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system

More information

Number System. Introduction. Decimal Numbers

Number System. Introduction. Decimal Numbers Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

More information

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010 Contents Number systems and conversion Binary arithmetic Representation of negative numbers Addition of two s complement numbers Addition of one s complement numbers Binary s Readings Unit.~. UNIT NUMBER

More information

Module 2: Computer Arithmetic

Module 2: Computer Arithmetic Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit

More information

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we

More information

COMP2121: Microprocessors and Interfacing. Number Systems

COMP2121: Microprocessors and Interfacing. Number Systems COMP2121: Microprocessors and Interfacing Number Systems http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Overview Positional notation Decimal, hexadecimal, octal and binary Converting

More information

UNIT 7A Data Representation: Numbers and Text. Digital Data

UNIT 7A Data Representation: Numbers and Text. Digital Data UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with

More information

Chapter 2. Data Representation in Computer Systems

Chapter 2. Data Representation in Computer Systems Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting

More information

Number Systems. Both numbers are positive

Number Systems. Both numbers are positive Number Systems Range of Numbers and Overflow When arithmetic operation such as Addition, Subtraction, Multiplication and Division are performed on numbers the results generated may exceed the range of

More information

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur 1 Number Representation 2 1 Topics to be Discussed How are numeric data items actually

More information

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng. CS 265 Computer Architecture Wei Lu, Ph.D., P.Eng. 1 Part 1: Data Representation Our goal: revisit and re-establish fundamental of mathematics for the computer architecture course Overview: what are bits

More information

CS & IT Conversions. Magnitude 10,000 1,

CS & IT Conversions. Magnitude 10,000 1, CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems

More information

Chapter 4: Computer Codes. In this chapter you will learn about:

Chapter 4: Computer Codes. In this chapter you will learn about: Ref. Page Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence Ref. Page

More information

Objectives. Connecting with Computer Science 2

Objectives. Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn how numbering systems are used to count Understand the significance of positional value

More information

The type of all data used in a C++ program must be specified

The type of all data used in a C++ program must be specified The type of all data used in a C++ program must be specified A data type is a description of the data being represented That is, a set of possible values and a set of operations on those values There are

More information

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems

More information

Number representations

Number representations Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Base-two, or

More information

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit Announcements Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit Quiz 2 Monday on Number System Conversions

More information

Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as:

Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: N Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: a n a a a The value of this number is given by: = a n Ka a a a a a

More information

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar

Data Representation COE 301. Computer Organization Prof. Muhamed Mudawar Data Representation COE 30 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals Presentation Outline Positional Number

More information

Binary Codes. Dr. Mudathir A. Fagiri

Binary Codes. Dr. Mudathir A. Fagiri Binary Codes Dr. Mudathir A. Fagiri Binary System The following are some of the technical terms used in binary system: Bit: It is the smallest unit of information used in a computer system. It can either

More information

Review of Number Systems

Review of Number Systems Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a digital computer.

More information

Numeric Encodings Prof. James L. Frankel Harvard University

Numeric Encodings Prof. James L. Frankel Harvard University Numeric Encodings Prof. James L. Frankel Harvard University Version of 10:19 PM 12-Sep-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved. Representation of Positive & Negative Integral and

More information

Introduction to Numbering Systems

Introduction to Numbering Systems NUMBER SYSTEM Introduction to Numbering Systems 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

More information

Introduction to Computers and Programming. Numeric Values

Introduction to Computers and Programming. Numeric Values Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000

More information

World Inside a Computer is Binary

World Inside a Computer is Binary C Programming 1 Representation of int data World Inside a Computer is Binary C Programming 2 Decimal Number System Basic symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Radix-10 positional number system. The radix

More information

Digital Computers and Machine Representation of Data

Digital Computers and Machine Representation of Data Digital Computers and Machine Representation of Data K. Cooper 1 1 Department of Mathematics Washington State University 2013 Computers Machine computation requires a few ingredients: 1 A means of representing

More information

Decimal & Binary Representation Systems. Decimal & Binary Representation Systems

Decimal & Binary Representation Systems. Decimal & Binary Representation Systems Decimal & Binary Representation Systems Decimal & binary are positional representation systems each position has a value: d*base i for example: 321 10 = 3*10 2 + 2*10 1 + 1*10 0 for example: 101000001

More information

Chapter 4: Data Representations

Chapter 4: Data Representations Chapter 4: Data Representations Integer Representations o unsigned o sign-magnitude o one's complement o two's complement o bias o comparison o sign extension o overflow Character Representations Floating

More information

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers 198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book Computer Architecture What do computers do? Manipulate stored information

More information

CHAPTER 5: Representing Numerical Data

CHAPTER 5: Representing Numerical Data CHAPTER 5: Representing Numerical Data The Architecture of Computer Hardware and Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint

More information

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation Course Schedule CS 221 Computer Architecture Week 3: Information Representation (2) Fall 2001 W1 Sep 11- Sep 14 Introduction W2 Sep 18- Sep 21 Information Representation (1) (Chapter 3) W3 Sep 25- Sep

More information

Numbering systems. Dr Abu Arqoub

Numbering systems. Dr Abu Arqoub Numbering systems The decimal numbering system is widely used, because the people Accustomed (معتاد) to use the hand fingers in their counting. But with the development of the computer science another

More information

Number Systems & Encoding

Number Systems & Encoding Number Systems & Encoding Lecturer: Sri Parameswaran Author: Hui Annie Guo Modified: Sri Parameswaran Week2 1 Lecture overview Basics of computing with digital systems Binary numbers Floating point numbers

More information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting

More information

CMPE223/CMSE222 Digital Logic Design. Positional representation

CMPE223/CMSE222 Digital Logic Design. Positional representation CMPE223/CMSE222 Digital Logic Design Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Positional representation First consider integers Begin with positive only

More information

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other

Kinds Of Data CHAPTER 3 DATA REPRESENTATION. Numbers Are Different! Positional Number Systems. Text. Numbers. Other Kinds Of Data CHAPTER 3 DATA REPRESENTATION Numbers Integers Unsigned Signed Reals Fixed-Point Floating-Point Binary-Coded Decimal Text ASCII Characters Strings Other Graphics Images Video Audio Numbers

More information

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University. Data Representation ti and Arithmetic for Computers Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Questions What do you know about

More information

D I G I T A L C I R C U I T S E E

D I G I T A L C I R C U I T S E E D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,

More information

Lecture 2: Number Systems

Lecture 2: Number Systems Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents

More information

Binary. Hexadecimal BINARY CODED DECIMAL

Binary. Hexadecimal BINARY CODED DECIMAL Logical operators Common arithmetic operators, like plus, minus, multiply and divide, works in any number base but the binary number system provides some further operators, called logical operators. Meaning

More information

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal Basic Definition REPRESENTING INTEGER DATA Englander Ch. 4 An integer is a number which has no fractional part. Examples: -2022-213 0 1 514 323434565232 Unsigned and -Coded Decimal BCD: -Coded Decimal

More information

CS 101: Computer Programming and Utilization

CS 101: Computer Programming and Utilization CS 101: Computer Programming and Utilization Jul-Nov 2017 Umesh Bellur (cs101@cse.iitb.ac.in) Lecture 3: Number Representa.ons Representing Numbers Digital Circuits can store and manipulate 0 s and 1 s.

More information

Chapter 2 Data Representations

Chapter 2 Data Representations Computer Engineering Chapter 2 Data Representations Hiroaki Kobayashi 4/21/2008 4/21/2008 1 Agenda in Chapter 2 Translation between binary numbers and decimal numbers Data Representations for Integers

More information

SE311: Design of Digital Systems

SE311: Design of Digital Systems SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir Al-Amer (Term 041) SE311_Lec3 (c) 2004 AL-AMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary

More information

Inf2C - Computer Systems Lecture 2 Data Representation

Inf2C - Computer Systems Lecture 2 Data Representation Inf2C - Computer Systems Lecture 2 Data Representation Boris Grot School of Informatics University of Edinburgh Last lecture Moore s law Types of computer systems Computer components Computer system stack

More information

Organisasi Sistem Komputer

Organisasi Sistem Komputer LOGO Organisasi Sistem Komputer OSK 8 Aritmatika Komputer 1 1 PT. Elektronika FT UNY Does the calculations Arithmetic & Logic Unit Everything else in the computer is there to service this unit Handles

More information

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example Appendix F Number Systems Binary Numbers Decimal notation represents numbers as powers of 10, for example 1729 1 103 7 102 2 101 9 100 decimal = + + + There is no particular reason for the choice of 10,

More information

Signed Binary Numbers

Signed Binary Numbers Signed Binary Numbers Unsigned Binary Numbers We write numbers with as many digits as we need: 0, 99, 65536, 15000, 1979, However, memory locations and CPU registers always hold a constant, fixed number

More information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting

More information

Data Representations & Arithmetic Operations

Data Representations & Arithmetic Operations Data Representations & Arithmetic Operations Hiroaki Kobayashi 7/13/2011 7/13/2011 Computer Science 1 Agenda Translation between binary numbers and decimal numbers Data Representations for Integers Negative

More information

Electronic Data and Instructions

Electronic Data and Instructions Lecture 2 - The information Layer Binary Values and Number Systems, Data Representation. Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert

More information

Announcement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay)

Announcement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay) Computer Architecture (CSC-3501) Lecture 3 (22 Jan 2008) Seung-Jong Park (Jay) http://www.csc.lsu.edu/~sjpark 1 Announcement Today, 1 st homework will be uploaded at our class website Due date is the beginning

More information

DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.

DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors. Data Representation Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic 0 (0 volts) and one for logic

More information

Data Representation. DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.

Data Representation. DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors. Data Representation Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic ( volts) and one for logic (3.3

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

DIGITAL SYSTEM DESIGN

DIGITAL SYSTEM DESIGN DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital Systems-Introduction to number systems, Binary numbers, Number

More information

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS

CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:

More information

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal Positional notation Ch.. /continued Conversions between Decimal and Binary Binary to Decimal - use the definition of a number in a positional number system with base - evaluate the definition formula using

More information

M1 Computers and Data

M1 Computers and Data M1 Computers and Data Module Outline Architecture vs. Organization. Computer system and its submodules. Concept of frequency. Processor performance equation. Representation of information characters, signed

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the

More information

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System Moodle 1 WILLINGDON COLLEGE SANGLI ELECTRONICS (B. Sc.-I) Introduction to Number System E L E C T R O N I C S Introduction to Number System and Codes Moodle developed By Dr. S. R. Kumbhar Department of

More information

Chap 1. Digital Computers and Information

Chap 1. Digital Computers and Information Chap 1. Digital Computers and Information Spring 004 Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion

More information

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh LOGIC DESIGN Dr. Mahmoud Abo_elfetouh Course objectives This course provides you with a basic understanding of what digital devices are, how they operate, and how they can be designed to perform useful

More information

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations. Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations

More information

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the

More information

QUIZ ch.1. 1 st generation 2 nd generation 3 rd generation 4 th generation 5 th generation Rock s Law Moore s Law

QUIZ ch.1. 1 st generation 2 nd generation 3 rd generation 4 th generation 5 th generation Rock s Law Moore s Law QUIZ ch.1 1 st generation 2 nd generation 3 rd generation 4 th generation 5 th generation Rock s Law Moore s Law Integrated circuits Density of silicon chips doubles every 1.5 yrs. Multi-core CPU Transistors

More information

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes Hamming Codes 1. DATA REPRESENTATION Information that a Computer

More information

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation

A complement number system is used to represent positive and negative integers. A complement number system is based on a fixed length representation Complement Number Systems A complement number system is used to represent positive and negative integers A complement number system is based on a fixed length representation of numbers Pretend that integers

More information

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 2-1 Data Types 2-2 Complements 2-3 Fixed-Point Representation 2-4 Floating-Point Representation

More information

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc. Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines

More information

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column 1's column 10's column 100's column 1000's column 1's column 2's column 4's column 8's column Number Systems Decimal numbers 5374 10 = Binary numbers 1101 2 = Chapter 1 1's column 10's column 100's

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

CHAPTER 2 (b) : AND CODES

CHAPTER 2 (b) : AND CODES DKT 122 / 3 DIGITAL SYSTEMS 1 CHAPTER 2 (b) : NUMBER SYSTEMS OPERATION AND CODES m.rizal@unimap.edu.my sitizarina@unimap.edu.my DECIMAL VALUE OF SIGNED NUMBERS SIGN-MAGNITUDE: Decimal values of +ve & -ve

More information

Divide: Paper & Pencil

Divide: Paper & Pencil Divide: Paper & Pencil 1001 Quotient Divisor 1000 1001010 Dividend -1000 10 101 1010 1000 10 Remainder See how big a number can be subtracted, creating quotient bit on each step Binary => 1 * divisor or

More information

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng. CS 265 Computer Architecture Wei Lu, Ph.D., P.Eng. CS 265 Midterm #1 Monday, Oct 18, 12:00pm-1:45pm, SCI 163 Questions on essential terms and concepts of Computer Architecture Mathematical questions on

More information

Level ISA3: Information Representation

Level ISA3: Information Representation Level ISA3: Information Representation 1 Information as electrical current At the lowest level, each storage unit in a computer s memory is equipped to contain either a high or low voltage signal Each

More information

Lecture (02) Operations on numbering systems

Lecture (02) Operations on numbering systems Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify

More information

Digital Fundamentals

Digital Fundamentals Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Quiz 2 Agenda Lecture: Chapter 2 (2-7 through 2-11):

More information

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0

Integers. N = sum (b i * 2 i ) where b i = 0 or 1. This is called unsigned binary representation. i = 31. i = 0 Integers So far, we've seen how to convert numbers between bases. How do we represent particular kinds of data in a certain (32-bit) architecture? We will consider integers floating point characters What

More information

COMP2611: Computer Organization. Data Representation

COMP2611: Computer Organization. Data Representation COMP2611: Computer Organization Comp2611 Fall 2015 2 1. Binary numbers and 2 s Complement Numbers 3 Bits: are the basis for binary number representation in digital computers What you will learn here: How

More information

Digital Logic Lecture 2 Number Systems

Digital Logic Lecture 2 Number Systems Digital Logic Lecture 2 Number Systems By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. Basic definitions. Number systems types. Conversion between different

More information

Chapter 2 Number Systems and Codes Dr. Xu

Chapter 2 Number Systems and Codes Dr. Xu Chapter 2 Number Systems and Codes Dr. Xu Chapter 2 Objectives Selected areas covered in this chapter: Converting between number systems. Decimal, binary, hexadecimal. Advantages of the hexadecimal number

More information

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System

More information

CO212 Lecture 10: Arithmetic & Logical Unit

CO212 Lecture 10: Arithmetic & Logical Unit CO212 Lecture 10: Arithmetic & Logical Unit Shobhanjana Kalita, Dept. of CSE, Tezpur University Slides courtesy: Computer Architecture and Organization, 9 th Ed, W. Stallings Integer Representation For

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR UNIT I Digital Systems: Binary Numbers, Octal, Hexa Decimal and other base numbers, Number base conversions, complements, signed binary numbers, Floating point number representation, binary codes, error

More information

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers Chapter 03: Computer Arithmetic Lesson 09: Arithmetic using floating point numbers Objective To understand arithmetic operations in case of floating point numbers 2 Multiplication of Floating Point Numbers

More information

Floating-point Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right.

Floating-point Arithmetic. where you sum up the integer to the left of the decimal point and the fraction to the right. Floating-point Arithmetic Reading: pp. 312-328 Floating-Point Representation Non-scientific floating point numbers: A non-integer can be represented as: 2 4 2 3 2 2 2 1 2 0.2-1 2-2 2-3 2-4 where you sum

More information

Number Systems Base r

Number Systems Base r King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 2 Fundamentals of Computer Engineering Term 22 Dr. Ashraf S. Hasan Mahmoud Rm 22-44 Ext. 724 Email: ashraf@ccse.kfupm.edu.sa 3/7/23

More information