Questions: 209

Answers by our Experts: 209

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

  • Write the assembly language code fragment that corresponds with the following high level language code fragment. You will need to use the SUB (subtract) instruction.

If (A>B) OR (B<C) then

           A = A + C

Else

           B = C - A


  • Write the assembly fragment to perform the following:

For x = 1 to 10

A = A + x

Next x


  • Write the assembly code for the following high-level pseudo code:

if ((a>=b) AND (b==c)) OR (a<=c) then

a = b + c

else

            a = b - c




Write a procedure that reads a text-paragraph from a file and then prints the number of characters on the screen.

Suppose that you have a computer with a memory unit of 24 bits per word. In this 

computer, the assembly program’s instruction set consists of 198 different operations. 

All instructions have an operation code part (opcode) and an address part (allowing for 

only one address). Each instruction is stored in one word of memory.

a. How many bits are needed for the opcode?

b. How many bits are left for the address part of the instruction?

c. How many additional instructions could be added to this instruction set without 

exceeding the assigned number of bits? Discuss and show your calculations.

d. What is the largest unsigned binary number that the address can hold?


Suppose that you have a computer with a memory unit of 24 bits per word. In this computer, the assembly program’s instruction set consists of 198 different operations.

All instructions have an operation code part (opcode) and an address part (allowing for only one address).

Each instruction is stored in one word of memory.

a. How many bits are needed for the opcode?

b. How many bits are left for the address part of the instruction?

c. How many additional instructions could be added to this instruction set without exceeding the assigned number of bits? Discuss and show your calculations.

d. What is the largest unsigned binary number that the address can hold?


b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program).

Instructions:

- Use “ORG” instruction to start your program at address equivalent to 25610.

- Use your last university ID number to input the value of X. For example, if your ID is1915161678234, then you will use the number 4 as the value of x.

- Do not forget to change the representation of the Input and Output windows in the simulator to Decimal. 


a) Write an assembly program using MARIE's assembly Instruction set that prompts the user to enter a non-negative integer that is less than 10. The program should include a subroutine that keeps prompting until a valid value is obtained. When a valid number is entered, it will be displayed. (Hint: Use JNS & JUMPI instructions to implement the subroutine)

N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it (not a screenshot!). Example: Subt One /Subtract 1 from AC


Write an Assembly language program that calculate the factorial of an integer number.

write an assembly language program that alphabetically shorts and array of 10 integers.

Convert the following decimal numbers to IEEE single-precision format. Give the results as eight hexadecimal digits.

a. 10

b. 5/6

c. -10/15

d. 0.75 


Execute the following program using

(a) Stack Architecture Instruction Set

(b) Accumulator Architecture Instruction Set

(c) General Purpose Register Instruction Set

(d) Using 0 address field

(e) Using 1 address field

(f) Using 2 address field

(g) Using 3 address field


F = R(C+D)-(RA+B)


LATEST TUTORIALS
APPROVED BY CLIENTS