The other way to represent Integers.

Slides:



Advertisements
Similar presentations
Abdullah Said Alkalbani University of Buraimi
Advertisements

Looking Inside the Black Box
Register Transfer and Microoperations Part2
Analysis of Algorithms II
IP Addressing Terminology
Genetic Algorithms in Problem Solving EVOLVING COMPUTER PROGRAMS (1) t Evolving Lisp Programs Keplers Third Law: P 2 = cA 3 PROGRAM ORBITAL_PERIORD.
Magnetic Data Storage A computer hard drive stores your data magnetically Disk NS direction of disk motion Write Head __ Bits of information.
Magnets used to store data ? Magnet with unknown state Current N S S N 0 1.
Binary Numbers.
Introduction to Computer Systems
8 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
15 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
1 Floating Point Representation and Arithmetic (see Patterson Chapter 4)
A Simple ALU Binary Logic.
B261 Systems Architecture
How to lie and get away with it Chris Budd How to tell the truth How to catch a liar How to lie and get away with it.
Pulse Code Modulation Pulse Code Modulation
EET260: A/D and D/A conversion
Recursion and Induction
Integers. Integer Storage Since Binary consists only of 0s and 1s, we cant use a negative sign ( - ) for integers. Instead, the Most Significant Bit is.
Truth Tables & Logic Expressions
ENGIN112 L7: More Logic Functions September 17, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 7 More Logic Functions: NAND, NOR,
Digital Logical Structures
Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built.
Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
Chapter 4 Gates and Circuits.
Binary Values and Number Systems
Prof. Dr. Nizamettin AYDIN edu. tr
 Which number is in exponential form: -10,, 10  Identify the Base of that number  What is the exponent in that number? - the number being multiplied.
Number Systems  binary, octal, and hexadecimal numbers  why used  conversions, including to/from decimal  negative binary numbers  floating point.
Fixed-point and floating-point numbers CS370 Fall 2003.
UNIVERSITY OF MASSACHUSETTS Dept
Chapter 13 Numerical Issues
IP Addressing  To go somewhere on the Internet, you must type a Uniform Resource Locator (URL).  A query is sent to the nearest DNS (Domain Name System)
Lecture no 6. Two's Complement Given a negative number (N), represented using the Two's Complement representation (N*), the magnitude of the number (P)
Binary Number Systems.
COMP3221 lec19-fp-I.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lectures 19 : Floating Point Number Representation – I
Nat 4/5 Computing Science Lesson 1: Binary
Binary Lesson 4 Hexadecimal and Binary Practice. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Combinational Circuits
Digital Logic & Design Lecture No. 3. Number System Conversion Conversion between binary and octal can be carried out by inspection.  Each octal digit.
10. Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Datorteknik IntegerAddSub bild 1 Integer arithmetic Depends what you mean by "integer" Assume at 3-bit string. –Then we define zero = 000 one = 001 Use.
14-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 14: Gaming Engines, Coding Style, Floating Point.
1/15/2015 Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Introduction to Binary, Octal and Hexadecimal Numbers Thaddeus Konar.
Number Systems Decimal Binary Denary Octal Hexadecimal Click the mouse or Press the space bar to Continue.
Finite State Machines Finite state machines with output
More Functions and Sets
Min terms and logic expression
The Logic of Compound Statements
Sample Test 1 Question. A pattern of binary digits can be interpreted in several different ways. Show how the pattern translates using each of.
Integers. Integer Storage Since Binary consists only of 0s and 1s, we can’t use a negative sign ( - ) for integers. Instead, the Most Significant Bit.
2’s Complement Arithmetic (remember it’s a fixed length system)
Binary Number Systems.
The Binary Number System
Data Representation Number Systems.
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Negative Integer Representation.
Lecture 6 Excess Notation. Excess 8 notation indicates that the value for zero is the bit pattern for 8, that is 1000 Excess 8 notation indicates that.
Sample Test 1 Question This one includes ASCII.. Sample Test 1 Question Show how the pattern translates using each of the following interpretations.
Computer Organization 1 Data Representation Negative Integers.
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 6
1.6) Storing Integer:.
Every number has its place!
Presentation transcript:

The other way to represent Integers. Excess Notation The other way to represent Integers.

Excess Notation (examples are in 8 bits to save space) Fixed length notation system. Uses 0 to represent negative values. The largest non-negative value: 11111111 The smallest non-negative value: 10000000 The largest negative value is: 01111111 The smallest negative value is: 00000000

Excess Notation 111 110 Consider the 8 patterns in 3 bits: 101 100 011 010 001 000

Excess Notation Interpreted as Natural Numbers: 111 7 110 6 101 5 100 4 011 3 010 2 001 1 000

Excess Notation Interpreted as Integers in 2’s Complement: 111 -1 110 -2 101 -3 100 -4 011 3 010 2 001 1 000

Excess Notation Interpreted as Integers in Excess Notation: 111 3 110 2 101 1 100 011 -1 010 -2 001 -3 000 -4

Excess Notation Three different Interpretations: 111 7 -1 3 110 6 -2 2 101 5 -3 1 100 4 -4 011 010 001 000

Excess Notation (examples are in 8 bits to save space) To better understand how binary patterns unpack under the 3 notations, let’s look at an example. Consider the pattern 10111001 Show the value represented if the pattern is: an unsigned integer an integer, in 2’s Complement Notation an integer, in Excess Notation

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) has 2 parts:

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) has 2 parts: the MSB

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) has 2 parts: the MSB the rest

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) has 2 parts: the MSB the rest Let’s look at the “rest”: 0111001

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) has 2 parts: the MSB the rest 0111001 represents the Natural number 32 + 16 + 8 + 1 = 57

Excess Notation (examples are in 8 bits to save space) The pattern (10111001) is, therefore, 57 greater than 10000000 – regardless of the meaning of the MSB.

Excess Notation (examples are in 8 bits to save space) As a Natural number, 10000000 is 128

Excess Notation (examples are in 8 bits to save space) As a Natural number, 10000000 is 128 In 2’s Complement, 10000000 is the smallest, negative value… -128

Excess Notation (examples are in 8 bits to save space) As a Natural number, 10000000 is 128 In 2’s Complement, 10000000 is the smallest, negative value… -128 In Excess Notation, 10000000 is the smallest, non-negative value… 0

Excess Notation (examples are in 8 bits to save space) So the pattern 10111001 is 57 greater than: 128 if it’s natural (57+128=185) -128 if it’s 2’s Complement (57-128=-71) 0 if it’s Excess (57+ 0= 57)