Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Make a file by yourself named ”Integer.txt” and add 5 integer values in it. Now, write a C++ program that reads data (5 integers) from the file and store them in integer array. Also make another integer array (int result []) of same size to store the results. The program should check for each number in array if it is prime number or not. If the number is prime, update value in result[] array from 0 to 1. Lastly, write output in another file named “Result.txt” 



A group of people are playing a game.They are standing and each carring a card with a number on it.These numbers in the list A. A random number S iis selected.


Find out the new list of numbers after

  • S people were removed from the left.
  • S people were removed from the right.


Sample Input1

1,2,3

1

Sample Output1

2 3

1 2



Write a program to print the not repeated string.


Input

The input contains a string S.


Output

The output contains a string, not repeated string.



Consider Figure 24.4 Page 271of the book computer organization and design by david patterson and complete the table of control signals with values (0, 1 or X - don't care ) for each of the following instructions.


LW SLT J BEQ ADDI AND

RegDst

Jump

Branch

Memread


MemtoReg

MemWrite

ALUSrc

RegWrite

ALU Control Input


The Positive Ones

by CodeChum Admin

There are different kinds of numbers, but among them all, the most commonly used numbers in our daily lives are those positive ones. So, I only want you to count all the positive numbers from the 4 outputted values and print out the result.


Go and search for the positive ones among these four!



Define a function CalcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. Relevant geometry equations: 

Volume = base area x height x 1/3 

Base area = base length x base width. 

(Watch out for integer division).


Consider Figure 4.24 on page 271 of the textbook computer organization and design by david patterson. Assume that the instruction word is fetched with the following value from the instruction memory. also

Suppose that at the beginning of the cycle in which the command is to be called, all the words in the instruction memory are equal to 0 and r0=0, r1= -1, r2 = 2, r3 = -3, r4 = -4, r5 = 10, r6 = 6, r8 = 8, r12 = 2, r31=-16.


Instruction word: 101011 00011 00010 0000000000010100


a) Get the outputs of sign-extension, jump, shift left 2 units for the instruction word above.

b) What are the inputs of the ALU control unit for the instruction word above.

c) What is the new PC value after this instruction is executed? How will this new value be placed on the PC?

d) While executing this instruction, get the output value of each multiplexer and the values of the registers.

e) Obtain the input values of the ALU and the other two adders (as shown).

f) What are the inputs of the register unit (register file )?



Where's the Biggest One?

by CodeChum Admin


We've already tried comparing 3 numbers to see the largest among all, so let's try a more complicated mission where we locate the position of the largest among 5 numbers. There are only 4 possible cases for this mission:


- if the largest digit is the first digit, print "Leftmost"


- if the largest digit is the third digit, print "Middle"


- if the largest digit is the last digit, print "Rightmost"


- if none of the above is correct, print "Unknown"




Now, show me how far you've understood your lessons!


Suppose a program is written with only the add, addi, not, beq, lw and sw commands, and the percentage of use of these commands in that program is 20%, 20%,0%,25%,25%,10% respectively.


a) What percentage of the program's time is spent on data memory? Why?


b) What percentage of the program execution time is the sign-extension circuit used? Why?



write the following in machine language. using ascii chart for the standard codes of the characters and then convert them to binary. please show working. you just write and scan. i. your name, ii. level, iii. session and iv. campus.

LATEST TUTORIALS
APPROVED BY CLIENTS