Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, 2010. 0 Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.

Slides:



Advertisements
Similar presentations
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Advertisements

ICS312 Set 2 Representation of Numbers and Characters.
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Data Representation Computer Organization &
Data Representation COE 205

Agenda Shortcuts converting among numbering systems –Binary to Hex / Hex to Binary –Binary to Octal / Octal to Binary Signed and unsigned binary numbers.
Assembly Language for Intel-Based Computers, 4th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Working with the data type: char  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Data Representation ICS 233
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Data Representation in Computers
Basic Concepts Computer Organization and Assembly Language.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Codes and number systems Introduction to Computer Yung-Yu Chuang with slides by Nisan & Schocken ( ) and Harris & Harris (DDCA)
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
Assembly Language for Intel-Based Computers, 5th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and copy this slide show for your personal use, or for.
Simple Data Type Representation and conversion of numbers
Lecture 5.
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?
Computers Organization & Assembly Language
Some material taken from Assembly Language for x86 Processors by Kip Irvine © Pearson Education, 2010 Slides revised 2/2/2014 by Patrick Kelley.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Assembly Language for x86 Processors 7th Edition
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Computer Science 111 Fundamentals of Programming I Number Systems.
Binary Arithmetic & Data representation
Chapter 1: Basic Concepts
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Binary, Decimal and Hexadecimal Numbers Svetlin Nakov Telerik Corporation
ICS312 Set 1 Representation of Numbers and Characters.
Assembly Language for x86 Processors 7 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and copy this.
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.
CPU Internal memory I/O interface circuit System bus
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Positional Number Systems
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.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Assembly Language for Intel-Based Computers
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Computer Organization and Assembly Languages 2007/11/10
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
Data Representation COE 301 Computer Organization Dr. Muhamed Mudawar
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
Data Representation COE 301 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum.
OCR Computing OGAT Data Types. What OCR need you to know… Data Types a) Primitive data types, integer, real/floating point, character,
1 Chapter 1: Basic Concepts Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine 9/6/2003.
Data Representation COE 308 Computer Architecture
Data Representation ICS 233
Lec 3: Data Representation
Assembly Language for x86 Processors 6th Edition
Data Representation.
Data Representation Binary Numbers Binary Addition
CSCI 198: Lecture 4: Data Representation
CSCI 161: Lecture 4: Data Representation
EPSII 59:006 Spring 2004.
Data Representation COE 301 Computer Organization
Computer Organization and Assembly Language
Data Representation ICS 233
Data Representation COE 308 Computer Architecture
Presentation transcript:

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive If the highest digit of a hexadecimal integer is > 7, the value is negative. Examples: 8A, C5, A2, 9D

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Forming the Two's Complement Negative numbers are stored in two's complement notation Represents the additive Inverse Note that =

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Binary Subtraction When subtracting A – B, convert B to its two's complement Add A to (–B) – Practice: Subtract 0101 from 1001.

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Learn How To Do the Following: Form the two's complement of a hexadecimal integer Convert signed binary to decimal Convert signed decimal to binary Convert signed decimal to hexadecimal Convert signed hexadecimal to decimal

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Ranges of Signed Integers The highest bit is reserved for the sign. This limits the range: Practice: What is the largest positive value that may be stored in 20 bits?

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Character Storage Character sets Standard ASCII(0 – 127) Extended ASCII (0 – 255) ANSI (0 – 255) Unicode (0 – 65,535) Null-terminated String Array of characters followed by a null byte Using the ASCII table back inside cover of book

Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Numeric Data Representation pure binary can be calculated directly ASCII binary string of digits: " " ASCII decimal string of digits: "65" ASCII hexadecimal string of digits: "9C" next: Boolean Operations