Students in the BIT level 300 class optained various grades in a Mid sem exam. A computer program is needed to find the highest and lowest class score.
Create an algorithm for the complete program needed to solve the above problem
Write a program which takes a 9-digit number input from user, converts it into its reverse
and then display one of the following statements: (10 marks)
• Original number is x steps bigger (where x is the difference between the two)
• Reversed number is x steps bigger
• Both numbers are equal; hence it is a palindrome.
Develop a data dictionary and a flowchart, that will accept 10 students details such Student Name, ID No. and Marks of three subjects (All marks entered by the user must be within the range of 0 -100). Calculate the average marks for the student and the average marks will determine the final grade of the student. The assessment will be as follow:
70 –100 : A
60 –69 : B
50 –59 : C
40 – 49 : D
0 –39 : F
A 4-stage pipeline has the stage delays as 150, 120, 160 and 140
nanoseconds respectively. Registers that are used between the stages have a
delay of 5 nanoseconds each.
Question: Assuming constant clock rate, calculate the total time taken to
process 1000 data items on this pipeline.
Write a program which takes a 9-digit number input from user, converts it into its reverse
and then display one of the following statements: (10 marks)
• Original number is x steps bigger (where x is the difference between the two)
• Reversed number is x steps bigger
• Both numbers are equal; hence it is a palindrome.
Enter a 9-digit number : 367548912
Reverse number: 219845763
Original number is 147,703,149 steps bigger
Enter a 9-digit number : 367548
It is not a 9-digit number. Please enter correct number.
Enter a 9-digit number : 259757952
Reverse number: 259757952
Both numbers are equal; hence it is a palindrome
Write a program which takes a number n as input and prints YAYY if the sum of all digits
except the rightmost digit is equal to the rightmost digit., otherwise print OOPS. (10 marks)
For example: If user enters 2237, it will print YAYY because 2+2+3 is equal to 7.
Whereas, if user enters 3425, it will print OOPS because 3+4+2 is not equal to 5.
Memory constrained embedded systems, IoT devices cannot have liberty to use lots of
memory. You are tasked to store the result of a NUCES-FAST student in one single variable. This can
be done using all bits of that variable in an efficient way. Write a program which prompts user to enter
the following student data and convert all this information to store in a single variable (see sample run).
Use bitwise AND, OR and SHIFT operators. Also use if-else where needed. (20 marks)
A 4-stage pipeline has the stage delays as 150, 120, 160 and 140
nanoseconds respectively. Registers that are used between the stages have a
delay of 5 nanoseconds each.
Question: Assuming constant clock rate, calculate the total time taken to
process 1000 data items on this pipeline.
Suppose we introduce pipelining on this machine. Assume that when
introducing pipelining, the clock skew adds 7ns of overhead to the execution
stages.
i. What is the instruction latency on the pipelined machine?
ii. How much time does it take to execute 200 instructions?
Consider a nonpipelined machine with 5 execution stages of lengths 50 ns,
50 ns, 60 ns, 70 ns, and 50 ns.
i. Find the instruction latency on this machine.
ii. How much time does it take to execute 200 instructions?