Q4 Solution - a) 0.10001 x 2 3 + 0.10101 x 2 6 Align...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: ______________________ Student Number: _____________________ Trent University Computer Science 230H Fall 2007 Quiz #4 Topic: ALU Total of 10 marks Open Text Book Duration: 1 hour 1. [2 marks] Give the value in binary scientific format (e.g. 1.101 x 2 -11001 ), of the following 32 bit floating point number assuming the same format as in your notes on slide 6 ALU Set 3, assuming a bias of 127. a) 01110101110101000000000000000000 0 11101011 10101000000000000000000 Biased exponent = 11101011 2 = 235 Actual exponent = 01101100 2 = 235 – 127 = 108 Answer: 1.10101 x 2 1101100 b) 1 00101101 11110000000000000000000 1 00101101 11110000000000000000000 Biased exponent = 00101101 2 = 45 Actual exponent = -01010010 2 = 45 – 127 = -82 Answer: -1.1111 x 2 -1010010 2. [8 marks] Perform the following operations on floating point numbers.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a) 0.10001 x 2 3 + 0.10101 x 2 6 Align significands: 0.10001 x 2 3 = 0.00010 x 2 6 Perform addition: 0.00010 x 2 6 + 0.10101 x 2 6 0.10111 x 2 6 Normalize: 0.10111 x 2 6 (answer) 1 Name: ______________________ Student Number: _____________________ b) 0.11111 x 2 -2 + 0.10001 x 2 -3 Align significands: 0.10001 x 2 -3 = 0.01000 x 2-2 Perform addition: 0.11111 x 2 -2 + 0.01000 x 2 -2 1.00111 x 2 -2 Normalize: 0.100111 x 2 -1 (answer) c) 0.10001 x 2 3- 0.10101 x 2 6 Align significands: 0.10001 x 2 3 = 0.00010 x 2 6 Perform subtraction: 0.00010 x 2 6- 0.10101 x 2 6- 0.10011 x 2 6 Normalize: - 0.10011 x 2 6 (answer) d) 0.11010 x 2 6 x 0.10011 x 2-5 Add exponents: 6 + (-5) = 1 Multiply significands: 11010 x 10011 11010 11010 00000 00000 11010____ 0.0111101110 x 2 1 Normalize: 0.11110111 x 2 (answer) 2...
View Full Document

This note was uploaded on 02/14/2010 for the course COMPUTER S COIS-3030 taught by Professor Hircock during the Spring '10 term at Trent University.

Page1 / 2

Q4 Solution - a) 0.10001 x 2 3 + 0.10101 x 2 6 Align...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online