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
Find the altitude of the right cylinder of maximum convex surface that can be inscribed in a given sphere.
strojnjashka [21]

Answer:

The radius 4 is maximum in convex surface

5 0
2 years ago
How to design a solar panel<br>​
artcher [175]

Answer:

#1) Find out how much power you need

#2 Calculate the amount of batteries you need.

#3 Calculate the number of solar panels needed for your location and time of year.

#4 Select a solar charge controller.

#5 Select an inverter.

#6 Balance of system

Explanation: To design solar panel, consider the following steps

1.) Find the power consumption demands

The first step in designing a solar PV system is to find out the total power and energy consumption of all loads that need to be supplied by the solar PV system as follows:

Calculate total Watt-hours per day for each appliance used.

 Add the Watt-hours needed for all appliances together to get the total Watt-hours per day which must be delivered to the appliances.

Calculate total Watt-hours per day needed from the PV modules.

Multiply the total appliances Watt-hours per day times 1.3 (the energy lost in the system) to get the total Watt-hours per day which must be provided by the panels.

2. Size the PV modules

Different size of PV modules will produce different amount of power. To find out the sizing of PV module, the total peak watt produced needs. The peak watt (Wp) produced depends on size of the PV module and climate of site location. We have to consider panel generation factor which is different in each site location. For Thailand, the panel generation factor is 3.43. To determine the sizing of PV modules, calculate as follows:

2.1 Calculate the total Watt-peak rating needed for PV modules

Divide the total Watt-hours per day needed from the PV modules (from item 1.2) by 3.43 to get the total Watt-peak rating needed for the PV panels needed to operate the appliances.

Calculate the number of PV panels for the system

Divide the answer obtained in item 2.1 by the rated output Watt-peak of the PV modules available to you. Increase any fractional part of result to the next highest full number and that will be the 

number of PV modules required.

Result of the calculation is the minimum number of PV panels. If more PV modules are installed, the system will perform better and battery life will be improved. If fewer PV modules are used, the system may not work at all during cloudy periods and battery life will be shortened.

3. Inverter sizing

An inverter is used in the system where AC power output is needed. The input rating of the inverter should never be lower than the total watt of appliances. The inverter must have the same nominal voltage as your battery.

For stand-alone systems, the inverter must be large enough to handle the total amount of Watts you will be using at one time. The inverter size should be 25-30% bigger than total Watts of appliances. In case of appliance type is motor or compressor then inverter size should be minimum 3 times the capacity of those appliances and must be added to the inverter capacity to handle surge current during starting.

For grid tie systems or grid connected systems, the input rating of the inverter should be same as PV array rating to allow for safe and efficient operation.

4. Battery sizing

The battery type recommended for using in solar PV system is deep cycle battery. Deep cycle battery is specifically designed for to be discharged to low energy level and rapid recharged or cycle charged and discharged day after day for years. The battery should be large enough to store sufficient energy to operate the appliances at night and cloudy days. To find out the size of battery, calculate as follows:

     4.1 Calculate total Watt-hours per day used by appliances.

     4.2 Divide the total Watt-hours per day used by 0.85 for battery loss.

     4.3 Divide the answer obtained in item 4.2 by 0.6 for depth of discharge.

     4.4 Divide the answer obtained in item 4.3 by the nominal battery voltage.

     4.5 Multiply the answer obtained in item 4.4 with days of autonomy (the number of days that you need the system to operate when there is no power produced by PV panels) to get the required Ampere-hour capacity of deep-cycle battery.

Battery Capacity (Ah) = Total Watt-hours per day used by appliancesx Days of autonomy

(0.85 x 0.6 x nominal battery voltage)

5. Solar charge controller sizing

The solar charge controller is typically rated against Amperage and Voltage capacities. Select the solar charge controller to match the voltage of PV array and batteries and then identify which type of solar charge controller is right for your application. Make sure that solar charge controller has enough capacity to handle the current from PV array.

For the series charge controller type, the sizing of controller depends on the total PV input current which is delivered to the controller and also depends on PV panel configuration (series or parallel configuration).

According to standard practice, the sizing of solar charge controller is to take the short circuit current (Isc) of the PV array, and multiply it by 1.3

Solar charge controller rating = Total short circuit current of PV array x 1.3

5 0
3 years ago
1. A _____ is applied to a wall or roof rafters to add strength and keep the building straight and plumb.
PSYCHO15rus [73]

Answer:

A force must s applied to a wall or roof rafters to add strength and keep the building straight and plumb

7 0
2 years ago
Discuss in detail the following methods used to redistribute income and wealth in cash grants?​
aev [14]

Answer:

Redistribution of income and wealth is the transfer of income and wealth (including physical property) from some individuals to others through a social mechanism such as taxation, welfare, public services, land reform, monetary policies, confiscation, divorce or tort law.

-The term typically refers to redistribution on an economy-wide basis rather than between selected individuals.

Interpretations of the phrase vary, depending on personal perspectives, political ideologies and the selective use of statistics.

-It is frequently heard in politics, usually referring to perceived redistribution from those who have more to those who have less. Occasionally, however, it is used to describe laws or policies that cause opposite redistribution that shift monetary burdens from low-income earners to the wealthy.

-

The phrase is often coupled with the term class warfare, with high-income earners and the wealthy portrayed as victims of unfairness and discrimination.

-

Redistribution tax policy should not be confused with predistribution policies. "Predistribution" is the idea that the state should try to prevent inequalities from occurring in the first place rather than through the tax and benefits system once they have occurred. For example, a government predistribution policy might require employers to pay all employees a living wage, not just a minimum wage, as a "bottom-up" response to widespread income inequalities or high poverty rates.

Many alternate taxation proposals have been floated without the political will to alter the status quo. One example is the proposed "Buffett Rule", which is a hybrid taxation model composed of opposing systems, intended to minimize the favoritism of the special interest tax design.

7 0
2 years ago
Why do bridges collapse?
Reika [66]

Hi! bridges could have been collapse due to an error made by the engineers during construction.

8 0
2 years ago
Read 2 more answers
Other questions:
  • How has drafting evolved in the 21st century
    10·1 answer
  • Which sentence about the technology design process is true
    12·1 answer
  • 2. One of the following systems is not typically used with floor
    5·1 answer
  • The value of the critical Reynolds number for the flow over a flat plate is 5 x10^5. The significance of the value is:
    13·1 answer
  • In a photonic material, signal transmission occurs by which of the following? a)- Electrons b)- Photons
    9·1 answer
  • What are the prefixes for 1, 10, 1000, 1,000,000, .1, .01, .001, .000001
    9·1 answer
  • Which of the following is NOT a line used on blueprints?
    13·1 answer
  • Whose responsibility is it to provide direction on correct ladder usage?<br> select the best option.
    8·1 answer
  • Engine vacuum is being discussed. Technician A says that when the engine is operating under light loads, engine vacuum is low. T
    11·1 answer
  • What is voltage drop?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!