{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

recitation_week_3 - precision floating number can represent...

Info icon This 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
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern