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

Compute the effective address and the content of ACC (accumulator) for a load in

ID: 3909498 • Letter: C

Question

Compute the effective address and the content of ACC (accumulator) for a load instruction of a 1-address machine for each type of addressing modes using the following assumptions: The load instruction is of length 4 bytes, the first byte is for op ode and mode and the other two bytes contain the value 90 for an address or an immediate value; The load instruction is stored in locations 12-15; The register (say R1)contains the value 800; .The location 800 contains the value 700 The location 90 contains the value 150; . The location 150 contains the value 77; ·The location 102 contains the value 1 1 ; . The location 106 contains the value 200; . The location 890 contains the value 76 Direct Immediate Indirect Relative Index Register Register Indirect

Explanation / Answer

Direct Addressing mode:

In this mode, the operand field of the Instruction set contains the address of the data.

So, in this case, effective address will be: 90, and accumulator will have the content of this address i.e.150.

Immediate Addressing mode:

In this mode, the operand field contains data. So, in this case, effective memory address will be: [90]. and accumulator will contain: 90

Indirect Addressing mode:

In this mode, the operand field of an Instruction set contains the address of the address containing the data so in this case, the effective address will be: 150 and accumulator will have: 77

Relative Addressing mode:

It is a type of displacement based addressing mode, In this type of addressing mode effective memory address is calculated by adding the content of operand field and content of program which is the address of next instruction to be executed. Here in this mode effective address will be: 90+[PC] and accumulator will contain the data present at this resulting address.

Index Addressing mode:

It is also a type of displacement based addressing mode, In this mode, the effective memory address is the sum of the content of operand field of the instruction set and the address pointed by Index register,

here effective address:90+[IR] and accumulator will have the data containing at this resulting address.

Register Addressing mode:

In this mode, the operand field of the instruction set contains the register address containing the data. So, here effective address will be: 90 and accumulator will contain:150

Indirect Register Addressing mode:

In this mode, the operand field of the instruction set contains the register address which is pointing to an address which contains the data. So, in this case, the effective memory address will be: 150 and accumulator will have:77

//If you have any doubt regarding the answer please ask in the comment section.

//Please upvote

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