1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alexandra [31]
3 years ago
14

Integer to Float Conversion All labs must be done during lab time. Each labs worth 10 points The lab can be hand in next day wit

h 2 points penalty. Remember: Grading will be on program correctness and comment completeness. (Every line of code should be commented. Also be sure to fill out the template comments.) Write a program that prompt the user for a temperature in Celsius and then display the result in Fahrenheit. Sample Output: Please input a temperature in Celsius => 39 The temperature in Fahrenheit is: => 102.19999695
Engineering
1 answer:
andrew-mc [135]3 years ago
4 0

Answer:

Code explained below

Explanation:

.data

msg1: .asciiz "Please input a temperature in celsius: "

msg2: .asciiz "The temperature in Fahrenheit is: => "

num: .float 0.0

.text

main:

#print the msg1

li $v0, 4

la $a0, msg1

syscall

#read the float value from user

li $v0,6 #read float syscall value is $v0

syscall #read value stored in $f0

#formula for celsius to fahrenheit is

#(temperature(C)* 9/5)+32

#li.s means load immediate float

#copy value 9.0 to $f2

li.s $f2,9.0  

#copy value 5.0 to $f3

li.s $f3,5.0

# following instructions performs: 9/5

#div.s - division of two float numbers

#divide $f2 and f3.Result will stores in $f1

div.s $f1,$f2,$f3

#following instruction performs: temperature(C) * (9/5)

#multiple $f1 and $f0.Result stored in $f1

mul.s $f1,$f1,$f0

#copy value 32 to $f4

li.s $f4,32.0

#following instruction performs: (temperature(C) * (9/5))+32

#add $f1 and $f4.Result stores in $f1

add.s $f1,$f1,$f4

#store float from $f1 to num

s.s $f1,num

#print the msg2

li $v0, 4 #print string syscall value is 4

la $a0, msg2 #copy address of msg2 to $a0

#print the float

syscall

li $v0,2 #print float syscall value is 2

l.s $f12,num #load value in num to $f12

syscall

#terminate the program

li $v0, 10 #terminate the program syscall value is 10

syscall

You might be interested in
A pinion and gear pair is used to transmit a power of 5000 W. The teeth numbers of pinion
tester [92]

Answer:

mark me as a brainleast

Explanation:

209781

6 0
2 years ago
Bind hole, 38 diameter, .50 deep
agasfer [191]

Answer:

59.69021

Explanation:

38/.5 x 3.14159

4 0
2 years ago
Pls follow me in brainly​
Sergio [31]

Answer:

sure

Add on:

!!

5 0
3 years ago
Read 2 more answers
Which is a feedback mechanism for a system?
stira [4]

The following is a feedback mechanism for a system :

<u>The progress bar when downloading a file on iTunes</u>

<u></u>

Explanation:

  • A feedback mechanism is a loop system wherein the system responds to a perturbation. The response may be in the same direction (as in positive feedback) or in the opposite direction (as in negative feedback).
  • Feedback occurs when outputs of a system are routed back as inputs as part of a chain of cause-and-effect that forms a circuit or loop. The system can then be said to feed back into itself.
  • Evaluation feedback needs to be done “in the moment” to help the person receiving the feedback know where they stand.
  • A feedback control system consists of five basic components: (1) input, (2) process being controlled, (3) output, (4) sensing elements, and (5) controller and actuating devices.
  • Because negative feedback produces stable circuit responses, improves stability and increases the operating bandwidth of a given system, the majority of all control and feedback systems is degenerative reducing the effects of the gain.

6 0
3 years ago
The universe is sometimes described as an isolated system. Why?
Romashka [77]

Answer and Explanation :The universe means it includes everything, even the things which we can not see is an isolated system because universe has no surroundings. an isolated system does not exchange energy or matter with its surroundings.Sometime universe is treated as isolated system because it obtains lots of energy from the sun but the exchange of matter or energy with outside is almost zero.

  • the total energy of an isolated system is always constant means total energy of universe is also constant
  • there is no exchange of matter or energy in an isolated system
8 0
3 years ago
Other questions:
  • Consider flow in between two parallel plates located a distance H from each other. Fluid flow is driven by the bottom plate movi
    15·1 answer
  • Hey, I have a question, I was thinking that if you have engineering skills or drawing skill you could help me to start a project
    15·1 answer
  • Check the answer that best describes the relationship between f(x) and x. (For example if f(x) is Θ(x) check that as your answer
    12·1 answer
  • Technician A says if the input signal turn-on time is too fast for the input circuit, your program may operate as though the inp
    11·1 answer
  • Engine blocks are made by using a manufacturing process called​
    12·1 answer
  • Which of the following placards allows a driver to park in a handicapped parking space.
    9·2 answers
  • What are the major types of stone used in construction? How do their properties differ? What sequence of operations would be use
    10·1 answer
  • Electrical circuits must be locked-out/tagged-out before electricians work on any equipment. Is this true or false?
    15·1 answer
  • Explain the function of both of the organelles pictured below.
    14·1 answer
  • Jnjn freeeeeeeeeeeeeeeeeeeeeeeeeeeeeee pointtttttttttt
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!