Chapter 2 Instructions: Language of the Computer Part IIa Number Representation.

Slides:



Advertisements
Similar presentations
Lecture 5: MIPS Instruction Set
Advertisements

CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
CMPT 334 Computer Organization Chapter 2 Instructions: Language of the Computer [Adapted from Computer Organization and Design 5 th Edition, Patterson.
DATA REPRESENTATION CONVERSION.
King Fahd University of Petroleum and Minerals
TCSS 371A Machine Organization. Getting Started Get acquainted Review syllabus Understand purpose, scope, and expectations of the course Discuss personal.
Data Representation COE 205
1 Representing Numbers Using Bases Numbers in base 10 are called decimal numbers, they are composed of 10 numerals ( ספרות ) = 9* * *10.
Assembly Language and Computer Architecture Using C++ and Java
ECE 15B Computer Organization Spring 2010 Dmitri Strukov Lecture 4: Arithmetic / Data Transfer Instructions Partially adapted from Computer Organization.
Assembly Language for Intel-Based Computers, 4th Edition
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
Lecture 4 Sept 9 Goals: Amdahl’s law Chapter 2 MIPS assembly language instruction formats translating c into MIPS - examples.
Introduction to Computing CPSC 203 January 24, 2006 Heejin Lim Chapter 1 Chapter 2 (part of)
Instruction Representation I (1) Fall 2005 Lecture 05: INSTRUCTION REPRESENTATION.
Data Representation ICS 233
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Binary, Decimal, & Hexadecimal Numbers
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
CMPT 334 Computer Organization
CMPE 325 Computer Architecture II Cem Ergün Eastern Mediterranean University Integer Representation and the ALU.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Lecture Objectives: 1)Define the terms least significant bit and most significant bit. 2)Explain how unsigned integer numbers are represented in memory.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
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
Character Data and 32-bit Constants (Lecture #20) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
AP Computer Science A – Healdsburg High School 1 Unit 1 - Binary Numbers - Hexadecimal Numbers.
Chapter 2 Bits, Data Types, and Operations. 2-2 Hexadecimal Notation It is often convenient to write binary (base-2) numbers as hexadecimal (base-16)
Chapter 2 CSF 2009 The MIPS Assembly Language: Introduction to Binary System.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /08/2013 Lecture 10: MIPS Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL STATE.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Lecture 2: Advanced Instructions, Control, and Branching EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer.
EET 4250 Instruction Representation & Formats Acknowledgements: Some slides and lecture notes for this course adapted from Prof. Mary Jane Penn.
Chapter 2 — Instructions: Language of the Computer — 1 Memory Operands Main memory used for composite data – Arrays, structures, dynamic data To apply.
CHAPTER 3 Arithmetic For Computers 1/31/ Topics for discussion 1/31/ Number system: { radix/base, a set of distinct digits, operations} Radix.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 9 Binary Representation and Logical Operations.
MIPS Instruction Set Architecture Prof. Sirer CS 316 Cornell University.
ECE 2110: Introduction to Digital Systems
Introduction to Number Representation A451 GCSE Computing.
Data Representation COE 301 Computer Organization Dr. Muhamed Mudawar
CS Computer Organization Numbers and Instructions Dr. Stephen P. Carl.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Yaohang Li.
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
Data Representation COE 301 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum.
1 Digital Logic Design (41-135) Chapter 5 Number Representation & Arithmetic Circuits Younglok Kim Dept. of Electrical Engineering Sogang University Spring.
Based on slides from D. Patterson and www-inst.eecs.berkeley.edu/~cs152/ COM 249 – Computer Organization and Assembly Language Chapter 3 Arithmetic For.
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
Lecturer: Santokh Singh
Data Representation ICS 233
Data Representation Binary Numbers Binary Addition
Morgan Kaufmann Publishers
EPSII 59:006 Spring 2004.
The University of Adelaide, School of Computer Science
Data Representation COE 301 Computer Organization
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Computer Architecture & Operations I
Chapter 2 Instructions: Language of the Computer
Binary Lesson 3 Hexadecimal
MIPS Microarchitecture Multicycle Processor
Computer Architecture
Data Representation ICS 233
MIPS Instruction Set Architecture
COMS 361 Computer Organization
Data Representation COE 308 Computer Architecture
Presentation transcript:

Chapter 2 Instructions: Language of the Computer Part IIa Number Representation

Florida A & M University - Department of Computer and Information Sciences Unsigned Binary Integers Given an n-bit binary number Example = 1× × × × × ×2 2 +1×2 1 +1×2 0 = = Range: 0 to +2 n – 1 4 bits  0-15; 8 bits  bits  0-65,335; 32 bits  0-4,294,967,295

Florida A & M University - Department of Computer and Information Sciences Another View Digit:d7 d6 d5 d4 d3 d2 d1 d0 Position: Weight: Convenient Table: Powers of 2

Florida A & M University - Department of Computer and Information Sciences A Few Observations (HEX) Given NUM: digit blocks can be written as single digits Hexadecimal  base 16 Hex digit represents value of the 4 bits Digits are 0-9, A(10), B, C, D, E, F(15) NUM 16 =  8B 8 11 Hex can simplify handling long binary numbers

Florida A & M University - Department of Computer and Information Sciences Hexadecimal Base C D A1010E B1011F1111 Example: E B A Hex: ECA8 6420

Florida A & M University - Department of Computer and Information Sciences More about HEX Given NUM: = 8B NUM 10 = 8 x B = 8 x = = 139 (same as binary)

Florida A & M University - Department of Computer and Information Sciences Hex great for long numbers! Given NUM: NUM 16 =  A0F NUM 10 = A x x F x = 10 x x = 10 x = = 41,207 Imagine this: 32 bits  8 hex digits!!

Florida A & M University - Department of Computer and Information Sciences Sign Extension Representing a number using more bits Preserve the numeric value In MIPS instruction set addi : extend immediate value lb, lh : extend loaded byte/halfword beq, bne : extend the displacement Replicate the sign bit to the left c.f. unsigned values: extend with 0s Examples: 8-bit to 16-bit +2: => –2: =>