Could someone check over my answers to verify I am correct.
Say we have a memory consisting of 2048 locations, and each location contains 16 bits.
◦ A) How many bits are required for the address? Answer: 11 bits
◦ B) If we use the PC-relative addressing mode, and want to allow control transfer between instructions 20 locations away, how many bits of a branch instruction are needed to specify the PC-relative offset? Answer: ±20 gives a range of 40, therefore need 6 bits.
◦ C) If a control instruction is in location 3, what is the PC-relative offset of address 10. Assume that the control transfer instructions work the same way as in the LC-3. Answer: PC counter is incremented to 4, 10-4 = 6.