CDA 3100 Fall2009. Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.

Slides:



Advertisements
Similar presentations
Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
Advertisements

Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
COMP 4—Power Tools for the Mind 1 What’s in the box? Representing concepts, Part 1 What we’ll cover for Part 1 : Representing concepts in a computer –Five.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Simple Data Type Representation and conversion of numbers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Numeral Systems Subjects: Numeral System Positional systems Decimal
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers citation and following credit line is included:
IT253: Computer Organization
Comp Sci 251 Intro 1 Computer organization and assembly language Wing Huen.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
CSE 111 Representing Numeric Data in a Computer Slides adapted from Dr. Kris Schindler.
Number Representation. 10/12/2015CDA31002 Conversion between Representations Now we can represent a quantity in different number representations How can.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
CDA 3100 Fall Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
Number systems, Operations, and Codes
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.
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
THE BINARY SYSTEM.
Data Representation, Number Systems and Base Conversions
AEEE2031 Data Representation and Numbering Systems.
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Computer Science Introduction to the Number Base Unit Adapted from Slides by John Owen Computer Science Instructor, Rockport-Fulton High School, Rockport,
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
CDA 3100 Spring Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
Numbers in Computers.
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.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
CSE370, Lecture 2 Lecture 2: Number Systems  Logistics Webpage is up! HW1 is posted on the web in the calender --- due.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
CDA 3100 Fall Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
Dr. ClincyLecture 2 Slide 1 CS Chapter 2 (1 of 5) Dr. Clincy Professor of CS Note: Do not study chapter 2’s appendix (the topics will be covered.
Lecturer: Santokh Singh
Computer Architecture and Number Systems
Introduction To Number Systems
Microprocessor Systems Design I
Logistics Always read the Calendar at
Number Systems Give qualifications of instructors:
University of Gujrat Department of Computer Science
CDA 3100 Summer 2011.
Introduction to IT By: Muhammed s. anwar.
CDA 3100 Fall 2015.
Number Representation
CDA 3100 Spring 2009.
CDA 3100 Summer 2013.
CDA 3100 Spring 2010.
Digital Electronics and Microprocessors
Lecture 2: Number Systems
CDA 3100 Fall 2012.
Instructor: Xiuwen Liu Department of Computer Science
COMS 361 Computer Organization
Dr. Clincy Professor of CS
Presentation transcript:

CDA 3100 Fall2009

Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course

1/18/2016CDA31003 Class organization My name is Zhenghao Zhang – Why I am teaching this course: I worked for two years as an embedded system engineer, writing codes for embedded controllers. Class web page – 09.htm 09.htm

1/18/2016CDA31004 Class Communication This class will use class web site to post news, changes, and updates. So please check the class website regularly Please also make sure that you check your s on the account on your University record

1/18/2016CDA31005 Required Textbook The required textbook for this class is – “Computer Organization and Design” The hardware/software interface – By David A. Patterson and John L. Hennessy – Fourth Edition

1/18/2016CDA31006 Lecture Notes and Textbook All the materials that you will be tested on will be covered in the lectures – Even though you may need to read the textbook for review and further detail explanations – The lectures will be based on the textbook and handouts distributed in class

What you will learn to answer (among other things) How does the software instruct the hardware to perform the needed functions What is going on in the processor How a simple processor is designed

1/18/2016CDA31008 Why This Class Important? If you want to create better computers – It introduces necessary concepts, components, and principles for a computer scientist – By understanding the existing systems, you may create better ones If you want to build software with better performance If you want to have a good choice of jobs If you want to be a real computer science major

1/18/2016CDA31009 Career Potential for a Computer Science Graduate x?id=904&terms=starting+salary

1/18/2016CDA Career Potential for a Computer Science Graduate Source: NACE Fall 2005 Report (

1/18/2016CDA Computer System Overview A computer system consists of hardware and software that are combined to provide a tool to solve problems (with best performance) – Hardware includes CPU, memory, disks, screen, keyboard, mouse... – Software includes System software – A general environment to create specific applications Application software – A tool to solve a specific problem

1/18/2016CDA Steps to Run a C Program – First, compiling it into machine code

1/18/2016CDA Steps to Run a C Program Then we need to run the program – The operating system locates where the program is – Then it loads the program into memory – The instructions in the program are then executed one by one – When the program is done, the operating system then releases the memory and other resources allocated to the program

1/18/2016CDA Opening the Box

1/18/2016CDA A Pentium 4 Processor Chip

1/18/2016CDA Numbers Numbers are abstraction of quantities – – How do we represent these quantities?

1/18/2016CDA Decimal Numbering System We humans naturally use a particular numbering system

1/18/2016CDA Decimal Numbering System For any nonnegative integer, its value is given by – Here d 0 is the least significant digit and d n is the most significant digit

1/18/2016CDA General Numbering System – Base X Besides 10, we can use other bases as well – In base X, the value of

1/18/2016CDA Commonly Used Bases – Note that other bases are used as well including 12 and 60 Which one is natural to computers? – Why? BaseCommon NameRepresentationDigits 10Decimal5023 ten or Binary two 0-1 8Octal11637 eight Hexadecimal139F hex or 0x139F0-9, A-F

1/18/2016CDA Meaning of a Number Representation When we specify a number, we need also to specify the base – For example, 10 presents a different quantity in a different base – There are 10 kinds of mathematicians. Those who can think binarily and those who can't

1/18/2016CDA Conversion between Representations Now we can represent a quantity in different number representations – How can we convert a decimal number to binary? – How can we then convert a binary number to a decimal one?

1/18/2016CDA Conversion Between Bases From binary to decimal example

Conversion Between Bases Converting from decimal to binary: – given a number in decimal, repeatedly divide it by 2, and write down the remainder from right to the left, until the quotient is 0 – Example: 11. QuotientRemainder

1/18/2016CDA Signed Numbers How to represent negative numbers? – Sign and magnitude We use an additional bit to represent the sign of the number – If the sign bit is 1, it represents a negative number – If the sign bit is 0, it represents a positive number How about zero then? There are other shortcomings of this representation – Related to the hardware implementation of adders – An extra step is required in general to set the sign since the proper sign can not be determined in advance It is not widely used for integer representations

1/18/2016CDA Signed Numbers Two’s complement – The negative of a two’s complement is given by inverting each bit from 0 to 1 and 1 to 0 and then adding

2’s complement In any computer, if numbers are represented in n bits, the non-negative numbers are from 0000…00 to 0111…11, the negative numbers are from 1000…00 to 1111…11.

ten 1 ten 2 ten …… … … ten -2 ten -1 ten The positive half from 0 to 2,147,483,647 The negative half from -2,147,483,648 to -1

1/18/2016CDA Two’s Complement Representation Properties – All negative numbers have a 1 in the most significant bit Hardware only needs to test this bit to see if a number is positive or negative The leading bit is often called the sign bit – For, the decimal value is

Why use 2’s complement? For example, consider (– 00011) = – = (13-3=10 in decimal) – = – – = ( – 00011) – = – = – = is the 2’s complement of Means that computer (the adder) does not have to be specifically redesigned for dealing with negative numbers, make life easier for the computer The reason is, assume you are subtracting a with b, where 2^{n}>a>b>0. Note that a-b=a+2^{n+1}-b-2^{n+1}. But 2^{n+1}-b is the 2’s complement of b. Also note that 2^{n}>a-b>0. So if represented in binary forms, a+2^{n+1}-b will be having a 1 bit in bit n+1 and some thing in bit 0 to bit n-1 equal to a-b. Bit n will be 0. So you take what is in bit 0 to bit n and it must be a-b.