Reference no: EM13999555
Project 2:
Part-1:
Write an ARM assembly code to implement a loop for calculating factorial of an integer N. For example if the input N from the standard input is equal to 5, it should return 120 (i.e, 5! ); the result (i.e, 120) should be printed on the standard output.
Part-2:
1. Repeat part-1 for N factorial, by adding code to measure program execution time in
milliseconds. This can be achieved by reading system time and storing it into a General Purpose Register (GPR), or preferably in memory location, and before the program exits read system time again the difference is the time elapsed for execution. Write the elapsed time in the output file on the same line as the factorial number in tabular form. Example:
Number ---------- 5
Factorial ----------- 120
Time elapsed (ms) ---------------------- 351
Once you have your program working and creating the proper out file as shown in the example above, move to next step.
2. Repeat step 1 using by having the following numbers in your input file to calculate their factorial and the output file must have one entry for each number as shown in the example table in previous step. The numbers to use in your input file are:
5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Note: add appropriate comments to your assembly code explaining what each instruction does in the context of your program.
Calculate the rotational kinetic energy
: Calculate the rotational kinetic energy, and the magnitude of the angular momentum of the disc. The centre-of-mass rotational inertia of a disc is Icm - mr2/2.
|
What is the mass of the airplane
: An 1800-kg tractor exerts a force of 1.75 x 10^4 N backward on the pavement, and the system experiences forces resisting motion that total 2400 N. If the acceleration is 0.150 m/s2, what is the mass of the airplane?
|
What force would you have to exert perpendicular to center
: Suppose your car was mired deeply in the mud and you wanted to use the method illustrated in Figure 4.29 to pull it out. (a) What force would you have to exert perpendicular to the center of the rope to produce a force of 12,000 N on the car if th..
|
How much energy is required to assemble given three charges
: What is the magnitude and direction of the net electrostatic force on charge q1? How much energy is required to assemble these three charges?
|
Write an arm assembly code to implement a loop for factorial
: Write an ARM assembly code to implement a loop for calculating factorial of an integer N. For example if the input N from the standard input is equal to 5, it should return 120 (i.e, 5! ); the result (i.e, 120) should be printed on the standard ou..
|
How much does the upper arm bone shorten in length
: During a wrestling match, a 150 kg wrestler briefly stands on one hand during a maneuver designed to perplex his already moribund adversary. By how much does the upper arm bone shorten in length? The bone can be represented by a uniform rod 38.0 ..
|
Create a single record form using the employees table
: The file will be renamed automatically to include your name. Change the project file name if directed to do so by your instructor. If necessary, enable active content again. Create a Single Record form using the Employees table as the record source
|
Calculate the magnetic field in the solenoid
: An air-filled toroidal solenoid has 390 turns of wire, a mean radius of 15.0 cm , and a cross-sectional area of 5.00 cm2 . If the current is 5.40 A , calculate the magnetic field in the solenoid.
|
Find the tension in the rope and the steel beam
: A mass of 120 kg is suspended on a rope and a steel beam as shown on the diagram below. d1 = 2 m, d2 = 4m, and d3 = 5m. Draw a diagram that shows all the forces involved in this problem. Find the tension in the rope and the steel beam.
|