# Lecture5 - ngineering Analysis ENG 3420 Fall 2009 Dan C....

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ngineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00 2 Lecture 5 Lecture 5 Last time: Applications of Laplace Transform for solving differential equations. Example. Today: Internal representations of numbers and characters in a computer. Arrays in Matlab Matlab program for solving a quadratic equation Next Time Roundoff and truncation errors More on Matlab 3 Insight not numbers!! Engineering requires a quantitative analysis (ultimately some numbers) but the purpose of engineering analysis is to gain insight not numbers!! Engineering analysis is based on concepts from several areas of math and statistics: Calculus (integration, differentiation, series) Complex analysis Differential equations Linear algebra Probability and statistics The purpose of this class is not to teach you Matlab, but to teach you how to use Matlab for solving engineering problems. Matlab is just a tool, an instrument. What good is to have a piano without being taught how to play. One must be familiar with the software tools but understand the math behind each method. 4 A 32-bit word can be used to represent: 1. a signed integer 2. a floating point number 3. a string of characters 4. a machine instruction b b 1 b 31 b 30 b 31 is the sign bit: 0 positive integer 1 negative integer Magnitude of the signed integer= b 30 x 2 30 + b 29 x 2 29 +..+ . b 2 x 2 2 + . b 1 x 2 1 + . b 0 x 2 b 12 b b 1 b 31 b 30 b 23 b 22 b 21 Exponent b 31 is the sign bit: 0 positive integer 1 negative integer Significant/Mantissa b 24 Floating point number= (-1) sign x Significant x 2 Exponent 1 2 3 ASCII Character ASCII Character ASCII Character ASCII Character Addressing Information 4 Opcode 8 bit 8 bit 8 bit 8 bit 7 bit 24 bit 24 bit 5 Twos complement representation of signed integers The 2s complement representation of a positive integer is the binary representation of the integer. For example: (0000 0000 0000 0000 0000 0000 0000 0010) 2 = 2 10 negative integer is obtained by subtracting the binary represntaton of the integer from a large power of two (specifically, from 2 N for an N-bit two's complement) and the andding 1 Example: N=32 the 2s complement of (-2) (1111 1111 1111 1111 1111 1111 1111 1111) 2 - (0000 0000 0000 0000 0000 0000 0000 0010) 2 = (1111 1111 1111 1111 1111 1111 1111 1101) 2 (1111 1111 1111 1111 1111 1111 1111 1101) 2 +(0000 0000 0000 0000 0000 0000 0000 0001) 2 = (1111 1111 1111 1111 1111 1111 1111 1110) 2 6 Twos complement representations of integers (0000 0000 0000 0000 0000 0000 0000 0000) 2 = 0 10 (0000 0000 0000 0000 0000 0000 0000 0001)...
View Full Document

## This note was uploaded on 02/17/2012 for the course EGN 3420 taught by Professor Staff during the Spring '08 term at University of Central Florida.

### Page1 / 26

Lecture5 - ngineering Analysis ENG 3420 Fall 2009 Dan C....

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online