Write a main program to call a procedure

Assignment Help Programming Languages
Reference no: EM13802745

Study the steps in the program shown in example above and predict the return value in variable z. The program simply implements the algorithm for the formula z = (2w+3)/4.

 

A. Edit, assemble, and run the program shown in the example above on the Tower.  Check the value that it produces in z on your calculator.

 

B. Cut and paste memory to show the value of z.

 

C. Cut and paste the Register window to show the remainder.

 

2. Write a main program to call a procedure that converts the Fahrenheit temperature value stored in the location labeled TdegF to its Celsius equivalent. The range of temperatures is 32°F to 212°F. The procedure stores the converted temperature in location TdegC. 

 

The following is the algorithm for temperature conversion:

 

-  Subtract 32 from Fahrenheit temperature;

 

-  Multiply the result of subtraction by five; and

 

-  00000000Divide the result of multiplication by nine.

 

A. Cut and paste the source code.

 

B. Test your program for three different values and show the result of each one by dumping memory.

 

3. Edit, assemble, and run the program shown in Example 2 above on the Tower. 

 

A. Check the code for the value, $73. Cut and paste the memory to show the number of zeros for this value.

 

B. Check the code for the value, $88. Cut and paste the memory to show the number of zeros for this value.

 

3. Even parity is where there is an even number of 1s in a string of data bits. Write a program to check the value loaded into Accumulator B and determine the state of the extra bit that would need to be added to the string in B in order to make all nine-bits have EVEN parity. Store that ninth (parity) bit as the MSB of Accumulator A and exit.

 

Example: If the value of B is 00111010, the number of ones in this pattern is four. This number is already even. Therefore, the extra bit is zero.

 

Example: If the value of B is 00101100, the number of ones in this pattern is three. This number is odd. Therefore, the extra bit is 1. The total number of ones, including the extra bit, becomes even.

 

A. Cut and paste the source code.

 

B. Test the code with the two values, 00111010 and 00101100. Cut and paste the Register window for each case to show the value of the extra bit in Register A.

Reference no: EM13802745

Questions Cloud

Differentiate between the concepts of ethics and morals : differentiate between the concepts of ethics and morals
Write an bibliography paper about gun violeneces in miami : Write an Annotated Bibliography paper about gun violeneces in miami.
Explain the duties of the public servant : Explain the duties of the public servant.
Sabermetric-based player evaluation : Examine why sabermetric-based player evaluation is such a shock to other executives in baseball. Evaluate why Beane is much more effective in his success by constructing a matrix of pitfalls and heuristics that highlight the differences between Bea..
Write a main program to call a procedure : Write a main program to call a procedure that converts the Fahrenheit temperature value stored in the location labeled TdegF to its Celsius equivalent. The range of temperatures is 32°F to 212°F
What are power factor improvement methods : What are Power Factor improvement Methods ? and what Their advantages & Disadvantages ?
What would be the dilemma and the implications : How do they differ from other situations resulting in disagreement between conflicting preferences, needs, or expectations?
What are common stereotypes and how can they be reversed : What are common stereotypes and how can they be reversed?
Work breakdown structure : See page 33 of the text for a graphic example of a work breakdown structure (WBS) hierarchy. Create a three level product-based WBS from a project you have managed or have experience with as a team member and present a graphic representation of yo..

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd