Question 1

How many bits are required to address a 4M 16 main memory if

  • main memory is byte addressable?
  • main memory is word addressable?

Question 2

A digital computer has a memory unit with 32 bits per word. The instruction set consists of 110 different operations. All instructions have an operation code part (opcode) and two address fields: one for a memory address and one for a register address. This particular system includes eight general-purpose, user-addressable registers. Registers may be loaded directly from memory, and memory may be updated directly from the registers. Direct memory-to-memory data movement operations are not supported. Each instruction is stored in one word of memory.

  • How many bits are needed for the opcode?
  • How many bits are needed to specify the register?
  • How many bits are left for the memory address part of the instruction?
  • What is the maximum allowable size for memory?
  • What is the largest unsigned binary number that can be accommodated in one word of memory?

Question 3

Given the instruction set for MARIE in this chapter, do the following. Decipher the following MARIE machine language instructions (write the assembly language equivalent):

  • 0010000000000111
  • 1001000000001011
  • 0011000000001001

Question 4

Write the following code segment in MARIEs assembly language:

if X > 1 then Y = X + X:
X = 0
end if;
Y = Y + 1

Question 5

What are the potential problems (perhaps more than one) with the following assembly language code fragment (implementing a subroutine) written to run on MARIE? The subroutine assumes the parameter to be passed is in the AC and should double this value. The Main part of the program includes a sample call to the subroutine. You can assume this fragment is part of a larger program.

Main, Load X
Jump Sub1
Sret, Store X
. . .
Sub1, Add X
Jump Sret

Question 6

Write the following code segment in MARIE assembly language:

X = 1;
While X < 10 do
X = X + 1;
Endwhile;
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.