recitation_week_3 - precision floating number can...

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

View Full Document Right Arrow Icon
1. Find the single precision floating number representation of the following decimal numbers: (a) 1.125 (b) 6.53125 (c) -5.546875 [answer.] (a ) From the last problem, we know that the binary scientific representation of 1.125 is 1.001. So, sign bit is 0,exponent is 0, fraction is 0.001. By the standard, each field is 0, 01111111, and 00100000000000000000000, respectively. So the number represented in hex is 0x3FB00000. (b). Sign bit is 0,exponent is 2, fraction is 0.1010001. By the standard, each field is 0, 10000001, and 101 0001 0000 0000 0000 0000. So the number represented in hex is 0x40D10000. (c). Its -101.100011. Sign bit is 1, exponent is 2, fraction is 0.01100011. By the standard, each field is 1, 10000001, and 011 0001 1000 0000 0000 0000. So the number represented in hex is 0xC0B18000. 2. You may help the students with the smallest number and the largest number a single
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: precision floating number can represent: 3. Then, you may help the students to review the instructions we have learned: add, sub, lw, sw, bne, beq, j, addi, and, or, xor, nor, andi, ori, xori, sll, srl then ask them to write a code segment to do 38 104 128 ) 127 254 ( 23 10 3.4028235 516925440 1704183484 3852885981 3402823466 2 2 2 ) 2 1 1 ( =-= -+--38 126 ) 127 1 ( 10 175494351 . 1 2 2 ) . 1 (--- = + if (($t0 + $t1) == ($t2 / 2)) $t0 = A[$t2]; else A[$t2] = $t0 & $t1; where the starting address of array A is in $s0 , and A[$t2] represents the 4 th element in A if $t2 == 4 . You may write down the code and let me have a look before next Monday. Note that with this little problem, we want to reinforce the ideas of 1. add 2. shift 3. load and store, array access 4. if-else in assembly...
View Full Document

Page1 / 2

recitation_week_3 - precision floating number can...

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