lecture5-post

# lecture5-post - BME 303 Lecture 5 Briefly Review Finish...

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

1 1 BME 303 Lecture 5 • Briefly Review & Finish: Boolean logic –HW #1 due today – turn it in now! –HW #2 due next Tuesday, February 8 –Looking ahead: Exam 1 in 3 weeks 2 Class website: At last! • I just obtained access to Blackboard! – will update everything (consistent between sections) tonight 3 BME Tutors • Engineering Study Table: Mon-Thur 7:30 pm – 9:30 pm, Jester City Limits • For BME 303: [email protected] –John Beck: Thur [email protected] –Plus other times by arrangement 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fraction (23-bit) exponent (8-bit) s Floating Point: “Trees” • Representation: N = ( -1 ) s ·1. fraction ·2 (exponent-127) (1 exponent 254) – We “normalize” mantissa by dropping leading 1, recording only its fractional part – To handle both positive and negative exponents, add 127 to the actual exponent to create a “biased exponent”. Special cases! E x p o n e t = 0 , ( - 1 ) S · . f r a c i 2 6 d m l z 5 I io : + t = , fr tio ± ·2 -1 ² N A u b 5 Floating Point: “Forest” • We need to store somehow, no “natural” format (like 2’s complement for integers), so some arbitrary choices were made • Arithmetic with floating point is complex to implement • Special cases: Overflow (± ), Underflow (±0), Illegal results (NAN) • Floating point calculations posses these problems – format just reflects that – numerical methods is an entire discipline 6 Operations: Arithmetic and Logical A data type includes representation and operations . • We’ve seen representation for signed integers, and these arithmetic operations: – Addition – Negation – Subtraction – Sign Extension – Shift left (x by 2) – Shift right (÷ by 2) • Arbitrary multiplication, division, etc., can be built from these basic operations.

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

View Full Document
2 7 Another use for bits: Logic • Beyond numbers – Logical variables: true or false, on or off, etc. –readily represented by binary – Logical variable A can take the values false = 0 or true = 1 only. – The manipulation of logical variables is known as Boolean Algebra – has its own set of operations not to be confused with arithmetical operations – Some basic operations: NOT, AND, OR 8 AND Operation • AND is a binary logical operation, i.e., as defined earlier, it has two operands. • Letting A and B denote the operands, A AND B = 1 if and only if both A = 1 and B = 1 • 1 AND B = ?, 0 AND B = ? A
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 09/06/2009 for the course BME 303 taught by Professor Ren during the Spring '08 term at University of Texas.

### Page1 / 9

lecture5-post - BME 303 Lecture 5 Briefly Review Finish...

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

View Full Document
Ask a homework question - tutors are online