General Computer Science for Engineers CISC 106 Lecture 22 Dr. John Cavazos Computer and Information Sciences 04/13/2009.

Slides:



Advertisements
Similar presentations
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Advertisements

Introduction to MATLAB and image processing. MATLAB and images The help in MATLAB is very good, use it! An image in MATLAB is treated as a matrix Every.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
General Computer Science for Engineers CISC 106 Lecture 28 Dr. John Cavazos Computer and Information Sciences 04/29/2009.
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
General Computer Science for Engineers CISC 106 Lecture 20 Dr. John Cavazos Computer and Information Sciences 04/08/2009.
General Computer Science for Engineers CISC 106 Final Exam Review Dr. John Cavazos Computer and Information Sciences 05/18/2009.
General Computer Science for Engineers CISC 106 Lecture 08 Dr. John Cavazos Computer and Information Sciences 2/27/2009.
General Computer Science for Engineers CISC 106 Lecture 25 Dr. John Cavazos Computer and Information Sciences 04/20/2009.
General Computer Science for Engineers CISC 106 Lecture 34 Dr. John Cavazos Computer and Information Sciences 05/13/2009.
General Computer Science for Engineers CISC 106 Lecture 33 Dr. John Cavazos Computer and Information Sciences 05/11/2009.
General Computer Science for Engineers CISC 106 Lecture 05 Dr. John Cavazos Computer and Information Sciences 2/20/2009.
General Computer Science for Engineers CISC 106 Lecture 23 Dr. John Cavazos Computer and Information Sciences 4/15/2009.
General Computer Science for Engineers CISC 106 Lecture 26 Dr. John Cavazos Computer and Information Sciences 04/24/2009.
Chapter 2 Data Types, Declarations, and Displays
Variables and constants Applications of Computer Programming in Earth Sciences Instructor: Dr. Cheng-Chien LiuCheng-Chien Liu Department of Earth Sciences.
General Computer Science for Engineers CISC 106 Lecture 18 Dr. John Cavazos Computer and Information Sciences 3/27/2009.
Representation and Conversion of Numeric Types 4 We have seen multiple data types that C provides for numbers: int and double 4 What differences are there.
Floating Point Numbers.  Floating point numbers are real numbers.  In Java, this just means any numbers that aren’t integers (whole numbers)  For example…
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Ch.3 - Computer Organization BIT Presentation 5.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Why does it matter how data is stored on a computer? Example: Perform each of the following calculations in your head. a = 4/3 b = a – 1 c = 3*b e = 1.
COMP 116: Introduction to Scientific Programming Lecture 28: Data types.
Representing numbers and Basic MATLAB 1. Representing numbers  numbers used by computers do not behave the same as numbers used in mathematics  e.g.,
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
Floating Point Representations CDA 3101 Discussion Session 02.
General Computer Science for Engineers CISC 106 Lecture 04 Dr. John Cavazos Computer and Information Sciences 09/10/2010.
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 2/10/2010.
Lecture #5 Introduction to C++
CISC105 – General Computer Science Class 9 – 07/03/2006.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 2/13/2009.
02 | Core Programming Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
Introducing C++ Programming Lecture 3 Dr. Hebbat Allah A. Elwishy Computer & IS Assistant Professor
1 Lecture 10: Floating Point, Digital Design Today’s topics:  FP arithmetic  Intro to Boolean functions.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Negative Integer Representation.
Matlab Data types, input and output. Data types Char: >> a = ‘ Jim ’ Char: >> a = ‘ Jim ’ Numeric: uint8, uint16, uint32, uint64 int8, int16, int32, int64.
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 6: Debugging in MATLAB Monday 15 Sept 2014 EGR 115 Introduction to Computing for Engineers.
1.2 Primitive Data Types and Variables
General Computer Science for Engineers CISC 106 Lecture 15 Dr. John Cavazos Computer and Information Sciences 03/16/2009.
IT11004: Data Representation and Organization Floating Point Representation.
COP2800 – Computer Programming Using JAVA University of Florida Department of CISE Spring 2013 Lecture 06 – Java Datatypes Webpage:
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
©Brooks/Cole, 2003 Chapter 3 Number Representation.
General Computer Science for Engineers CISC 106 Lecture 02 James Atlas Computer and Information Sciences.
Chapter 7 What’s Wrong with It? (Syntax and Logic Errors) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Basic Data Types อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา Chapter 4.
Software Design and Development Storing Data Computing Science.
General Computer Science for Engineers CISC 106 Lecture 27 Dr. John Cavazos Computer and Information Sciences 04/27/2009.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
General Computer Science for Engineers CISC 106 Lecture 09 Dr. John Cavazos Computer and Information Sciences 03/04/2009.
How Computers Store Variables
Floating Point Representations
EPSII 59:006 Spring 2004.
Other Kinds of Arrays Chapter 11
INC 161 , CPE 100 Computer Programming
Introduction to Programming
COMS 161 Introduction to Computing
IT11004: Data Representation and Organization
C Programming Lecture-3 Keywords, Datatypes, Constants & Variables
Variables and Constants
Presentation transcript:

General Computer Science for Engineers CISC 106 Lecture 22 Dr. John Cavazos Computer and Information Sciences 04/13/2009

Lecture Overview Symbolic Debugger ( ) Date Types Memory size/efficiency/accuracy

Symbolic Debugger Open m-file to debug in Matlab editor Can set breakpoints Where you want execution to suspend Execute in command window as normal, 2009 from 1:00 PM to 1:30 PM

Symbolic Debugger Execution suspends in editor at breakpoint Can view variables in command window Can step through the code Can continue to next breakpoint 17, 2009 from 1:00 PM to 1:30 PM

Classes of Data Types

Single-Precision floating point Stores number in 32 bits Bit 31 is sign (0 = positive, 1 = negative) Bits 0 through 30 for number (exponent and fraction), 2009 from 1:00 PM to 1:30 PM

Double-Precision (default) Stores number in 64 bits Bit 63 is sign (0 = positive, 1 = negative) Bits 0 through 62 for number (exponent and fraction), 2009 from 1:00 PM to 1:30 PM

Integers (Signed Values) int8 (8 bits) can represent -128 to 127 int16, int32, int64 x = int8(200) x ← 127 x=int8(-500) x ← -128;

Integers (Unsigned Values) uint8 (8 bits) can represent 0 to 255 uint16, uint32, uint64 x = uint8(400) x ← 255 x=uint8(-500) x ← 0;

intmin and intmax intmin(‘uint8’) 0 intmax(‘int8’) 127

Integer arrays array = zeros(100,100, ‘int8’); Creates a 100-by-100 int8 array initialized to zero.

Efficiency If array will only require certain values Use correct datatype! For example: Images typically only have values Need only uint8

Efficiency (cont’d) double requires 8 bytes uint8 requires 1 byte Double requires 8 times more memory to store images!