CS1104-2aNumber Systems Supplementary Notes 1 Lecture 2: Number Systems Supplementary Notes  Complements Complements  Floating-point Numbers Floating-point.

Slides:



Advertisements
Similar presentations
COMP2130 Winter 2015 Storing signed numbers in memory.
Advertisements

Lecture - 2 Number systems and computer data formats
©Brooks/Cole, 2003 Chapter 3 Number Representation.
1 IEEE Floating Point Revision Guide for Phase Test Week 5.
Floating Point Numbers
Floating Point Numbers. CMPE12cGabriel Hugh Elkaim 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or.
Floating Point Numbers. CMPE12cCyrus Bazeghi 2 Floating Point Numbers Registers for real numbers usually contain 32 or 64 bits, allowing 2 32 or 2 64.
Lecture 3 Number Representation 2 This week – Recap Addition – Addition circuitry – Subtraction of integers in binary – Representing numbers with fractional.
Representing Information as Bit Patterns
Chapter 5 Floating Point Numbers. Real Numbers l Floating point representation is used whenever the number to be represented is outside the range of integer.
1 Lecture 3 Bit Operations Floating Point – 32 bits or 64 bits 1.
Floating Point Numbers
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
Operations on data CHAPTER 4.
Binary Number Systems.
Chapter 3 Data Representation part2 Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
Binary Representation and Computer Arithmetic
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
The Binary Number System
Simple Data Type Representation and conversion of numbers
ELEN 5346/4304 DSP and Filter Design Fall Lecture 12: Number representation and Quantization effects Instructor: Dr. Gleb V. Tcheslavski Contact:
Binary Representation. Binary Representation for Numbers Assume 4-bit numbers 5 as an integer  as an integer  How? 5.0 as a real number  How?
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Computer Architecture
Number Systems Spring Semester 2013Programming and Data Structure1.
Complement Numbers. Outline  Negative Numbers Representation  Sign-and-magnitude  1s Complement  2s Complement  Comparison of Sign-and-Magnitude.
9.4 FLOATING-POINT REPRESENTATION
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
Number Systems and Codes. CS2100 Number Systems and Codes 2 NUMBER SYSTEMS & CODES Information Representations Number Systems Base Conversion Negative.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Erik Jonsson School of Engineering and Computer Science FEARLESS Engineeringwww.utdallas.edu/~pervin EE/CE 2310 – HON/002 Introduction to Digital Systems.
The Teacher CP4 Binary and all that… CP4 Revision.
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
CISC105 – General Computer Science Class 9 – 07/03/2006.
The Teacher CP4 Binary and all that… CP4 Revision.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
Floating Point Arithmetic
Department of Management School of Business, Economics and Informatics Binary Numbers 2 Eva Szatmari
Floating Point in Binary 1.Place Value Chart:
Floating Point Binary A2 Computing OCR Module 2509.
Floating Point Numbers
Numbers in Computers.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.7 Instructor: Lin Chen Sept 2013.
Representation of Data (Part II) Computer Studies Notes: chapter 19 Ma King Man.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Write using exponents. Example 2-1a Answer:The base is 6. It is a factor 4 times, so the exponent is 4.
CS2100 Number Systems Supplementary Notes 1 NUMBER SYSTEMS SUPPLEMENTARY NOTES  Complements  Floating-point Numbers.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Positional Number Systems In a general radix-r positional system, with fixed word width k, a number is represented by a string of k digits.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
Binary & Normalization What is Normalization? We discussed this the other day (special review session slides, near the end) Can someone tell us.
Learning Objectives 3.3.1f - Describe the nature and uses of floating point form 3.3.1h - Convert a real number to floating point form Learn how to normalise.
DIGITAL Logic DESIGN Digital system and binary numbers Lecturer: Ms. Farwah Ahmad.
FLOATING-POINT NUMBER REPRESENTATION
Floating Point Numbers
Fundamentals of Computer Science
Data Representation Covering… Binary addition / subtraction
Introduction To Computer Science
Numbers in a Computer Unsigned integers Signed magnitude
CS1010 Programming Methodology
Luddy Harrison CS433G Spring 2007
Lecture No.5.
Presentation transcript:

CS1104-2aNumber Systems Supplementary Notes 1 Lecture 2: Number Systems Supplementary Notes  Complements Complements  Floating-point Numbers Floating-point Numbers

CS1104-2aComplements2 Complements (1/4)  “Find the complement of a number” is the short way of saying “find the negated value in the complement system”.  For example, the two questions below are equivalent.  [4-bit base-2] Find the 1’s complement of Answer:  [4-bit base-2] If x is (0110) 1s, what is -x in 1’s complement form? Answer: (1001) 1s  So, “find the 1’s complement of 0110” is not asking for “how is 0110 represented in 1’s complement”.

CS1104-2aComplements3 Complements (2/4)  More examples:  [8-bit base-2] Find the 1’s complement of 101. Answer:  [8-bit base-2] Find the 1’s complement of Answer:  [8-bit base-2] How is (101) 2 represented in 1’s complement? Answer:  [8-bit base-2] How is -(101) 2 represented in 1’s complement? Answer:  [8-bit base-2] Find the 2’s complement of Answer:

CS1104-2aComplements4 Complements (3/4)  More examples:  [8-bit base-2] What is (111) 2 in 2’s complement form? Answer:  [8-bit base-2] What is -(111) 2 in 2’s complement form? Answer:  [6-bit base-2] What is (14) 10 in 1’s complement form? Answer: (001110) 1s  [6-bit base-2] What is (-14) 10 in 2’s complement form? Answer: (110010) 2s

CS1104-2aComplements5 Complements (4/4)  More examples:  [3-digit base-10] Find the 9’s complement of 25. Answer: 974.  [3-digit base-10] Find the 10’s complement of 123. Answer: 877.  [3-digit base-8] Find the 7’s complement of 712. Answer: 065.  [3-digit base-8] Find the 8’s complement of 123. Answer: 655.  [2-digit base-7] What is the radix complement of 15? Answer: 52.  [3-digit base-9] What is the diminished radix complement of 814? Answer: 074.

CS1104-2aFloating-point Numbers6 Floating-point Numbers (1/2)  Assume a 10-bit floating-point scheme with: 1-bit sign, 5-bit normalised mantissa, and 4-bit exponent.  What is this value: ?  Sign bit is 1, so value is negative.  Mantissa is ( ) 2, or (0.75) 10  What about exponent?  If exponent is unsigned, then exponent = 9.  If exponent is signed, and sign-and-magnitude is used, then exponent = -1.  If exponent is signed, and 1’s complement is used, then exponent = -6.  If exponent is signed, and 2’s complement is used, then exponent = -7.

CS1104-2aFloating-point Numbers7 Floating-point Numbers (2/2)  Therefore,  If exponent is unsigned, then value is -(0.11) 2 x 2 9, or -( ) 2, or -(384) 10.  If exponent is in sign-and-magnitude, then value is -(0.11) 2 x 2 -1, or -(0.011) 2, or (0.375) 10.  If exponent is in 1’s complement form, then value is -(0.11) 2 x 2 -6, or -( ) 2.  If exponent is in 2’s complement form, then value is -(0.11) 2 x 2 -7, or -( )

8 End of file