1 / 110

Monday, October 11 Assignment(s) due: Assignment #7: IEEE FLOATING POINT FORMATS

Monday, October 11 Assignment(s) due: Assignment #7: IEEE FLOATING POINT FORMATS EMULATOR PROGRESS WORKSHEET 1 Quiz(zes) due: Quiz #7: Debug Note: Quiz #8: Floating Point Formats is due next Monday Tonight is the cutoff date for Assignment #5 (Complement Arithmetic)

goldy
Download Presentation

Monday, October 11 Assignment(s) due: Assignment #7: IEEE FLOATING POINT FORMATS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Monday, October 11 Assignment(s) due: Assignment #7: IEEE FLOATING POINT FORMATS EMULATOR PROGRESS WORKSHEET 1 Quiz(zes) due: Quiz #7: Debug Note: Quiz #8: Floating Point Formats is due next Monday Tonight is the cutoff date for Assignment #5 (Complement Arithmetic) Next Monday is the cutoff date for all Debug and Floating Point assignments and quizzes(these topics will be covered on the midterm) Any assignments turned in to me by Thursday afternoon will be available in the lab on Monday afternoon Please note: The midterm is next Monday (at the beginning of class) - an 8.5 in. * 11 in. cheat sheet will be allowed We will review for the midterm tonight

  2. Conversion to/from floating point formats: - decimal number to hexadecimal floating point format: - convert decimal number to binary - convert to normalized scientific form (varies) - convert exponent to its excess-N form - add sign bit - convert binary number to hexadecimal - hexadecimal floating point format to decimal value - convert hexadecimal number to binary - determine sign - determine exponent - determine fraction from its normalized form - convert to its non-scientific binary form - convert to decimal

  3. - a problem using the same format as Lab #9 - 32 bits - 1 bit for the sign bit - 7 bits for the exponent - using excess-64 - using base 16 for the exponent - 24 bits for the normalized fraction - radix point to the left of the most significant bit - round-off because of rounding - how would 25.12510 be stored in hexadecimal?

  4. Step 1: Convert 25.12510 to binary

  5. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number

  6. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number .00011001001 * (162)10

  7. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number .00011001001 * (162)10 Step 3: Calculate the exponent

  8. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number .00011001001 * (162)10 Step 3: Calculate the exponent 2 + 64 = 6610 = 10000102

  9. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number .00011001001 * (162)10 Step 3: Calculate the exponent 2 + 64 = 6610 = 10000102 Step 4: Put the number together 0 1000010 000110010010000000000000

  10. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number .00011001001 * (162)10 Step 3: Calculate the exponent 2 + 64 = 6610 = 10000102 Step 4: Put the number together 0 1000010 000110010010000000000000 In hexadecimal: 0100 0010 0001 1001 0010 0000 0000 0000 4 2 1 9 2 0 0 0

  11. - the same problem using the same format as Lab #9, part 2 (IEEE format) - 32 bits - 1 bit for the sign bit - 8 bits for the exponent - using excess-127 - using base 2 for the exponent - 24 bits for the normalized fraction - radix point to the right of the most significant bit - the most significant bit is "hidden" - round-off because of rounding - how would 25.12510 be stored in hexadecimal?

  12. Step 1: Convert 25.12510 to binary

  13. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number

  14. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number 1.1001001 * (24)10

  15. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number 1.1001001 * (24)10 Step 3: Calculate the exponent

  16. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number 1.1001001 * (24)10 Step 3: Calculate the exponent 4 +127 = 13110 = 100000112

  17. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number 1.1001001 * (24)10 Step 3: Calculate the exponent 4 +127 = 13110 = 100000112 Step 4: Put the number together 0 10000011 10010010000000000000000

  18. Step 1: Convert 25.12510 to binary 25.12510 = 11001.0012 Step 2: Normalize the binary number 1.1001001 * (24)10 Step 3: Calculate the exponent 4 +127 = 13110 = 100000112 Step 4: Put the number together 0 10000011 10010010000000000000000 In hexadecimal 0100 0001 1100 1001 0000 0000 0000 0000 4 1 C 9 0 0 0 0

  19. - using the IEEE standard short real - 32 bits - 1 bit for the sign bit - 8 bits for the exponent - using excess-127 - using base 2 for the exponent - 23 bits for the normalized fraction - radix point to the right of the most significant bit - the most significant bit is hidden - round-off because of rounding - how would 414E000016 be represented as a decimal number?

  20. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2

  21. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2 Step 2: The exponent is 13010 or 3 (130 - 127)

  22. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2 Step 2: The exponent is 13010 or 3 (130 - 127) Step 3: The fraction is 1.10011100000 . . .2

  23. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2 Step 2: The exponent is 13010 or 3 (130 - 127) Step 3: The fraction is 1.10011100000 . . .2 Step 4: The normalized form is 1.1001112 * (23)10

  24. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2 Step 2: The exponent is 13010 or 3 (130 - 127) Step 3: The fraction is 1.10011100000 . . .2 Step 4: The normalized form is 1.1001112 * (23)10 Step 5: In binary 1100.1112

  25. Step 1: Convert 414E000016 to binary 414E000016 = 01000001010011100000 . . .2 or 0 10000010 10011100000 . . .2 Step 2: The exponent is 13010 or 3 (130 - 127) Step 3: The fraction is 1.10011100000 . . .2 Step 4: The normalized form is 1.1001112 * (23)10 Step 5: In binary 1100.111 Step 6: In decimal 12.875

  26. Data Table N: 18 X: 19

  27. 20: 400 21: 820 22: 518 Data Table N: 18 X: 19 23: 019 24: 119 25: 418 26: 319 27: 518 28: 730 29: 623 30: 900

  28. 20: 400 21: 820 22: 518 If the input cards are: 013 052 070 005 041 What is the output? Data Table N: 18 X: 19 23: 019 24: 119 25: 418 26: 319 27: 518 28: 730 29: 623 30: 900

  29. 016 005 013 007

  30. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI

  31. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 12 03 24 00 10 FF

  32. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 0120 12 03 24 00 10 FF

  33. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 0120 0002 12 03 24 00 10 FF

  34. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 03120120 0002 12 03 24 00 10 FF

  35. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 03120120 0002 0336 12 03 24 00 10 FF

  36. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 03120120 0002 0336 0246 12 03 24 00 10 FF

  37. 6. Given the following information in DEBUG: -u 100, 10A 21F0:0100 BB2001 MOV BX, 120 21F0:0103 BE0200 MOV SI, 2 21F0:0106 0307 MOV AX, [BX] 21F0:0108 0300 ADD AX, [BX + SI] 21F0:010A 034002 ADD AX, [BX + SI + 02] 21F0:010D 894004 MOV [BX + SI +04], AX 21F0:0110 CD20 INT 20 -e 120 12 03 24 00 10 FF 0120 0121 0122 0123 0124 0125 0126 0127 AX BX SI 03120120 0002 0336 0246 12 03 24 00 10 FF 46 02

  38. More practice: Given the following information in DEBUG: -u 100 21F0:0100 MOV AX,ABCD 21F0:0103 MOV BX,0120 21F0:0106 MOV CX,0004 21F0:0109 SUB AX,[BX] 21F0:010B ADD BX,0002 21F0:010E LOOP 109 21F0:0110 INT 20 -d 120,12F EB 02 46 00 EB 38 5A 01 - 10 FF 01 02 A3 FF 88 04 Trace through the program above and indicate below the contents of the registers and memory location just before the INT 20 instruction is executed. AX = BX = CX =

  39. The number 1.27510 = ? 2 • 1.010001 • 1.01 • 1.1001101 • 1.1

  40. If the number 1.010001 normalized using the IEEE standard (using radix 2 to normalize, radix point to the right of the most significant bit, and the most significant bit being hidden) it will result in whichfraction and exponent? • .1010001 and 1 • .1010001 and 0 • .010001 and 1 • .010001 and 0

  41. For the binary number 1 10000101 01010001000000000000000: Using excess-127, what is the exponent in base 10? • -6 • 0 • 4 • 6

  42. For the binary number 1 10000101 01010001000000000000000: With an exponent of 6 and using radix 2, what is the binary normalized form? • -.010100001 * (26)10 • -.010100000101 * (2-6)10 • -1.01010001 * (26)10 • -1.101010001 * (26)10

  43. If the binary normalized form is -1.01010001 * (26)10:The number in binary is: • -1010100.01 • -101010001.1 • -101010001 • -.00000101010001

More Related