{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00

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

View Full Document
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.

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

View Full Document
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 0 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 0 b 12 b 0 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 Two’s complement representation of signed integers The 2’s 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 2’s 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

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

View Full Document
6 Two’s complement representations of integers (0000 0000 0000 0000 0000 0000 0000 0000) 2 = 0 10 (0000 0000 0000 0000 0000 0000 0000 0001) 2 = 1 10 (0000 0000 0000 0000 0000 0000 0000 0010) 2 = 2 10 …………………….
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern