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

  Prepare a program that takes the data from triangle

Prepare a program that takes the data from triangle.txt (supplied in this folder) and outputs a message indicating whether the triangle is a right triangle. The text file has data for three triangles.

  Explaining class with no constructors

How many constructors can a class have? Can you have a class with no constructors? If a class has more than one constructor, which of them gets called?

  Write recursive boolean method search array for value

Write down the recursive boolean method named isMember. Method must search the array for specified value, and retun true if value is found, or false if value is not foundin array.

  Matrix multiplication code with mpi

Matrix multiplication code with MPI. At the beginning of each of the programs, write names of group members in the comment line.

  Return boolean value true if string in array is palindrome

Write the recursive method testPalindrome which returns boolean value true if string stored in array is palindrome and false otherwise. Method must ignore spaces and punctuation in string.

  Program asks for number of shares-whole dollar portion price

Program asks for number of shares held, whole dollar portion of price, and fraction portion. fraction portion is to be input as two integer values, one for numerator and one for the denominator.

  Method takes string and integer as parameters

Write a method called multiConcat which takes a String and an integer as parameters. Return String made up of the string parameter concatenated with itself count times.

  Problem 1you have gathered the following information for a

problem 1you have gathered the following information for a friend who manages a restaurant. you will use this data for

  The student class and the examgrades class

The student type should describe student's last name, first name, id ( letter 'N' followed by an 8-digit number), gpa (a real number in the range of 0.0 to 4.0, a whole number of credits completed, and a single letter status indicating full time

  Create while-end repetition structure includes a nested if

Create your own While-End (or For-End) repetition structure that includes a nested if-then selection structure. You decide the theme. You should provide both the pseudocode and the flowchart of your example.

  Program that prompts user to enter five test scores

Write the algorithm for a program that prompts the user to enter five test scores.

  Write pseudocode for finding grade of a student

Write pseudocode for finding grade of a student given his/her total score. The program must display a grade of A if the score is above 85, a B if it is between 85 and 75, a C.

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