Create a calculator which could do the following operations. Such as
i) Addition and subtruction of two single digits
ii) Other than this it could say whether the single digit is Odd or Even.
iii) Put 2 single digits and say whether 1st number is greater than 2nd number, less than 2nd number or equal.
An array is defined as a collection of homogenous elements stored in contiguous memory locations. From this background, you are given eight values obtained from some experiment conducted by a researcher to establish the weights in grams of insects after feeding them:
1.2, 1.4, 1.8, 1.7, 1.0, 1.2, 4.6 and 2.6. Write assembly program to accomplish the following tasks.
1.Calculate and display the total for the weights as recorded from the experiment (8 Marks)
2.Display the weight of second, second last and last weights as observed from the experiment. (7 Marks)
A quantity surveyor has requested you to design an application using a flowchart to estimate the amount of paint required to paint a cylindrical water storage tank. The tank will be painted on the interior surface only. Each square meter of the surface will need 1 liter of paint that costs KES 500. The labor cost for painting the tank is 1000 KES. The program should prompt user to enter radius and height of the tank in meters then pass these values to a procedure which calculate and display the surface area of the tank, amount of paint needed and total cost of the painting the tank. In this regard you are required to:
1.Draw a flowchart to represent this system (12 Marks)
2.Write an assembly program to implement the design in a) above. (8 Marks)
Read each integer in an array of n 32 bit unsigned integer, mask it's MSB and LSB to zero without affecting other bits and then store the updated integer at corresponding position in another array
Write a program in assembly language to read a number entered by the user.The program should display an enlarged version of a given number on the screen.The program should do the following:
Clear the screen and change the colour to yellow on blue.
Change the cursor position to row 10, column 0.
Prompt the user to key in upper case letter (A-E).Read the letter from keyboard.
Test whether the number is in range (A-E).Display an error message if the letter is out of range and terminate program.
Define a bit pattern for each letter and use this pattern to display the individual line.
Write a program that displays a string in all possible combinations of foreground and background colors (16 x 16 =256). The colors are numbered from 0 to 15, so you can use a nested loop to generate all possible combinations. Also use a delay of 1s in each foreground color change.
Write a program that uses a loop to copy all the elements from an unsigned Word (16-bit) array into an unsigned doubleword (32-bit) array.