Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Computer Org questions.. 8.What is the largest data size that can be loaded or s

ID: 3679060 • Letter: C

Question

Computer Org questions..

8.What is the largest data size that can be loaded or stored with one instruction?

   9.   How many instructions are necessary to load or store a 15-byte value?

   10.   What is the notation for the memory address used with the load and store mnemonics?

   11.   Why are there more load instructions than store instructions?

   12.   If a 32-bit word is stored to memory address 100, what is the address of the most significant byte?

   13.   What single instruction will round %l0 down to the nearest multiple of 8?

   14.   How do you expand the stack frame to make room for local variables?

   15.   Given a pointer to an array and an index, give a mathematical expression for the address of the element at that index.

Explanation / Answer

10.What is the notation for the memory address used with the load and store mnemonics?

The LOAD instruction copies the contents of a memory location or places an

immediate value into an accumulator or a CPU register.

- STORE instructions save the contents of a CPU register into a memory location.

- N and Z flags of the CCR register are automatically updated and the V flag is

cleared.

- All except for the relative mode can be used to select the memory location or

value to be loaded into an accumulator or CPU register.

- All except for the relative and immediate modes can be used to select memory

location to store contents of the CPU register.

Direct LDAA

Extended LDAB

Index LDAA

    11.Why are there more load instructions than store instructions?

If you want to access the same variable from different threads you must use a synchronization mechanism which is provided from your language or a library which fits to your os. Nothing else will give you a guarantee to work.

The problem is not the real access to any kind of memory. You definitely must ensure that your code contains memory barriers as needed for the underlying libraries and OS support. If there are no barriers between multi thread access you will maybe not see any change from a write in one thread while read it from a second one.

This will also be a problem on a single core cpu because the compiler have no idea that you modify a variable from two threads if you don't use any kind of synchronization.

To your add on: You simply have no control over any kind of memory access without writing your code in assembler. And if you write it in assembler, you! have to deal with registers L1/L2/Lx Caching, Memory Mapping, Inter-CPU-Communication and so on. Forget all about load/store instruction. This is only 1% of the job!

If you have time critical jobs:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote