Activity 2 How is the word length of a two’s complement representation changed without affecting its value? In this activity, we are going to study how.

Slides:



Advertisements
Similar presentations
By: Matthew Ng. AND, XOR, OR, Complement, Circular Left shift, and Addition Modulo Circular Left Shift is done with s positions (0 ≤ s ≤ 31) – Denoted.
Advertisements

Addition and Subtraction. Outline Arithmetic Operations (Section 1.2) – Addition – Subtraction – Multiplication Complements (Section 1.5) – 1’s complement.
2’s Complement Arithmetic (remember it’s a fixed length system)
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Signed Numbers Up till now we've been concentrating on unsigned numbers. In real life we have to represent signed numbers ( like: -12, -45, 78). The difference.
CSE20 Lecture 3 Number Systems: Negative Numbers 1.Sign and Magnitude Representation 2.1’s Complement Representation 3.2’s Complement Representation 1.
Convert Decimal to Floating point number [IEEE 754]
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
Conversion Between Lengths Positive number pack with leading zeros +18 = = Negative numbers pack with leading ones -18 =
Number Systems Part 2 Numerical Overflow Right and Left Shifts Storage Methods Subtraction Ranges.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 29, 2004 Lecture Number: 26.
+ CS 325: CS Hardware and Software Organization and Architecture Integers and Arithmetic Part 2.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
Positional Number Systems
Number Representation
ECE2030 Introduction to Computer Engineering Lecture 2: Number System Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Tech.
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Number Systems and Logic Prepared by Dr P Marais (Modified by D Burford)
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
Addition and Substraction
Module 2.  In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers.
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
Floating Point Binary A2 Computing OCR Module 2509.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
Binary Arithmetic James A. Rome Tennessee Governor's Academy August 2010.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
Negative Number Sign-Magnitude: left-most bit as the sign bit –16 bits –Example: 4-bit numbers is given by is given by ’s complement:
Floating Point Numbers
Floating Point Numbers
Nat 4/5 Computing Science Lesson 1: Binary
Department of Computer Science Georgia State University
Topic: Binary Encoding – Part 2
Binary & Hex Review.
Negative numbers: Week 10 Lesson 1
CHAPTER 9 COMPUTER ARITHMETIC - ALU
Negative Binary Numbers
Introduction To Computer Science
Conversion, Carry and Overflow
Computer Science 210 Computer Organization
Numbers in a Computer Unsigned integers Signed magnitude
Data Representation Integers
Negative Binary Numbers
CSE 102 Introduction to Computer Engineering
Number Systems.
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Exercise: Add these two single precision IEEE 754 numbers: … …0 Left number: 1.101x24 Right number: 1.011x 22= x24.
Addition and Substraction
Binary Addition & Subtraction
Computer Science 210 Computer Organization
CSC 143 Two' s complement.
Unit 18: Computational Thinking
Negatives, Addition, Subtraction
Number Representation
CPS120: Introduction to Computer Science
ECE 331 – Digital System Design
Normalised Floating Point Numbers
CSC 220: Computer Organization Signed Number Representation
Binary & Hex Review.
Lecture No.5.
Chapter3 Fixed Point Representation
GCSE COMPUTER SCIENCE Topic 3 - Data 3.3 Logical and Arithmetic Shifts.
OBJECTIVES After reading this chapter, the reader should be able to :
1.6) Storing Integer: 1.7) storing fraction:
Two’s Complement & Binary Arithmetic
Today Binary addition Representing negative numbers 2.
Presentation transcript:

Activity 2 How is the word length of a two’s complement representation changed without affecting its value? In this activity, we are going to study how the word length of a two’s complement representation is changed without affecting its value.

Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 1. Find out the 8-bit representation of two’s complement   of –410.   8-bit binary representation of 410 = 0000 01002   One’s complement of –410    = 1111 2   Two’s complement of –410    = 2 1011 1111 1100

Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 2. Find out the 16-bit representation of two’s complement   of –410.   16-bit binary representation of 410 = 2   One’s complement of –410     = 2   Two’s complement of –410     = 2 0000 0000 0000 0100 1111 1111 1111 1011 1111 1111 1111 1100

Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 3. Hence or otherwise, suggest the steps of converting a   two’s complement representation from m-bit to n-bit   (where n > m).   ________________________ ________________________________ ________________________ ____________ If the m-bit representation is non-negative (i.e the leftmost bit is 0), add or remove the leading ‘0’ to the left of the m-bit representation, forming an n-bit representation. If the m-bit representation is negative (i.e. the leftmost bit is 1), add or remove the leading ‘1’ to the left of the m-bit representation, forming an n-bit representation.

Activity 2 How is the word length of a two’s complement representation changed without affecting its value? Procedures 3. Hence or otherwise, suggest the steps of converting a   two’s complement representation from m-bit to n-bit   (where n > m).   ________________________ ________________________________ ________________________ ____________ If the m-bit representation is non-negative (i.e the leftmost bit is 0), add or remove the leading ‘0’ to the left of the m-bit representation, forming an n-bit representation. If the m-bit representation is negative (i.e. the leftmost bit is 1), add or remove the leading ‘1’ to the left of the m-bit representation, forming an n-bit representation.