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

Base-displacement addressing is a generalization form of indexed addressing used

ID: 3677771 • Letter: B

Question

Base-displacement addressing is a generalization form of indexed addressing used in the IBM S/370 architecture. In the S/370 architecture, all memory operand addresses are encoded as: where the operand memory address is computed as EA = Reg[Base] + Zero_Extend(Displacement). Assume that you are working with a machine that has 8 possible base registers and a 12-bit field for encoding the base-displacement addressing mode. How many distinct addresses can be referenced from one base register? If data object X is located at address 527 what is its displacement from the nearest base register? (Assume that base registers are statically assigned starting at zero and distributed through the entire entire program's address space in such a way as to maximize their address ranges.) If the computer used three valued logic instead of binary logic, how many distinct addresses could be referenced from one base register?

Explanation / Answer

a)

total bits = 12

Registers = 8 = 23

Number of bits to represent 8 registers = 3

Thus, No. of bits for Base = 3 bits and No. of bits for Displacements = 9

Addresses referenced from one base register = 29 = 512

b)Each base address can reference 512 address starting from 0.

Hence displacement from nearest base address = 527 %512 = 15 +1 =16

c)Three valued logic :

Registers = 8 < 32 => 2 bits

total bits = 12

Thus, No. of bits for Base = 2 bits and No. of bits for Displacements = 10

Addresses referenced from one base register = 310 = 59049

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