Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have the program in C im not sure how to transcribe it here is my c code: #include float voltage,power; void findvoltage(float,float); void findcurrent(float,float);

image text in transcribed

I have the program in C im not sure how to transcribe it

here is my c code:

#include

float voltage,power; void findvoltage(float,float); void findcurrent(float,float);

main() {

float current,resistance;

printf("Enter the current value:");

scanf("%f",¤t);

printf("Enter the value of Resistance:");

scanf("%f",&resistance);

findvoltage(current,resistance);

findcurrent(current,voltage);

}

void findvoltage(float current,float resistance) {

voltage=current*resistance;

printf("voltage %f: ",voltage);

}

void findcurrent(float current,float voltage) {

power=current*voltage;

printf("power is %f:",power);

}

2. Write a ARMv8 program that finds voltage drop and power dissipated by a resistance (R) when a current (I) flows through it. Resistance and current values are given as inputs. Create a function that would find the voltage drop, and create another function that would find the power. Use these functions in your program. The input and output values are single precision floating-point values. Assume the input resistance value (R) is in register SO and current (I) is in register S1. Store the computed voltage drop in register S2 and computed power in register S3. Assemble, test, and simulate the assembly code using DS-5 simulator. Do not upload the entire DS-5 project. Only

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

In the Grossman model, optimal health status declines with age.

Answered: 1 week ago