Silver_Smoulder

Project 4

Nov 22nd, 2019
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. Write a program that accepts 2 numbers as input.
  2. The first is a signed integer such as -3,+567,-452 etc. Since -0 is basically meaningless a +/- 0 will exit the program. (this means the program will not work for numbers between -1 and +1.)
  3. The second number is a decimal number in binary such as .11,.1010110 etc. example .7510 = .112
  4.  
  5. you will convert these 2 numbers to a single floating point single precision number using logic instructions such as and, or, shift
  6.  
  7. This site will help check your answers
  8.  
  9. https://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html
  10.  
  11.  
  12. code to print floating point number that is "created" in register $s0
  13. mtc1 $s0,$f12 #move to coprocessor 1 (floating point unit)
  14. li $v0,2 #print a floating point number
  15. syscall
  16.  
  17.  
  18. have your program convert values that are entered until 0 is entered for the whole number (so won't convert 0.xxxxx)
  19.  
  20. name your program firstInitialLastNameP4.asm, or it will not be graded. ( my project would be named ELichtenthalP4.asm)
  21.  
  22. You may use anything we've done this semester
Advertisement
Add Comment
Please, Sign In to add comment