Representation of Integers HKCE Computer Studies Education Department 2000.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
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.
Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding ’s complement Ignore carry.
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號 數位訊號 (digital signal) 指的是以預先定義的符號表示不連續 的訊號 one bit 8 bits=one byte 電腦裡的所有資料,包括文 字、數據、影像、音訊、視 訊,都是用二進位來表示的。
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
電腦的基本單位 類比訊號 (analog signal) 指的是連續的訊號
Number System and Codes
Number Representation Rizwan Rehman, CCS, DU. Convert a number from decimal to binary notation and vice versa. Understand the different representations.
Two’s Complement 1.As an action: (Assume the starting value is 1011) 1.Flip the bits from the starting value => Add one to get the answer.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
1.6 Signed Binary Numbers.
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
Computer Systems 1 Fundamentals of Computing Negative Binary.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
Chapter 3 Number Representation. Convert a number from decimal 、 hexadecimal,octal to binary notation and vice versa. Understand the different representations.
Computer Architecture
Binary Arithmetic & Data representation
COMPSCI 210 Semester Tutorial 1
Foundations of Computer Science Chapter 4 Operations on Bits.
Chapter 3 Number Representation. Convert a number from decimal to binary notation and vice versa. Understand the different representations of an integer.
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
The Teacher CP4 Binary and all that… CP4 Revision.
Positional Number Systems
Number Representation
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
The Teacher CP4 Binary and all that… CP4 Revision.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
2015/11/23 Jackie Kan /11/23NTU DSD (Digital System.
By Jariya Phongsai A two's-complement system is a system in which negative numbers are represented by the two's complement of the absolute value; this.
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
IT1004: Data Representation and Organization Negative number representation.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
09/03/20161 Information Representation Two’s Complement & Binary Arithmetic.
Computer Organization 1 Data Representation Negative Integers.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
Starter Using the mini whiteboards record your answers: 1) Name 2 different Character Sets 2) Convert the Hex number 9E into denary 3) Convert the binary.
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.
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
11001 / 101, / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the result.
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:
Negative Binary Numbers
CSCI 198: Lecture 4: Data Representation
11001 / 101 , / ) Perform subtraction on the given unsigned binary numbers using the 2's complement of the subtrahend. Where the.
Computer Science 210 Computer Organization
Numbers in a Computer Unsigned integers Signed magnitude
CSCI 161: Lecture 4: Data Representation
Negative Binary Numbers
CSE 102 Introduction to Computer Engineering
Lesson objectives Understand how computers represent and manipulate numbers [unsigned integers, signed integers (sign and magnitude, Two’s complement)
Computer Science 210 Computer Organization
1.6) Storing Integer:.
Unit 18: Computational Thinking
Negatives, Addition, Subtraction
CSC 220: Computer Organization Signed Number Representation
Lecture No.5.
Today Binary addition Representing negative numbers 2.
Presentation transcript:

Representation of Integers HKCE Computer Studies Education Department 2000

Sign-and-magnitude 符號數值表示法 Sign 0 Pos 1 Neg Magnitude

3-bit example

or -0 ?

Two’s Complement 二進制補碼 counter on cassette recorder … Play Reverse

Negative Positive

2’s Complement of 1. Positive Number 2. Binary Format 3. Interchange 0’s and 1’s 4. Add 1 to code

2’s Complement of 1. Positive Number 2. Binary Format 3. Interchange 0’s and 1’s 4. Add 1 to code Ex.

2’s Complement of 1. Positive Number 2. Binary Format 3. Interchange 0’s and 1’s 4. Add 1 to code = +107 Why? Ex.

What is the decimal form of the 2’s complement value, ?

Home Assignment Reply the on home assignment. Visit the web pages in the for the preparation of the next lesson.