Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A PC-relative mode branch instruction is 8 by... Start Learning for Free
A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.
    Correct answer is '548300'. Can you explain this answer?
    Verified Answer
    A PC-relative mode branch instruction is 8 bytes long. The address of ...
    PC – relative mode branch instruction uses content of the program counter. Program counter points to the next instruction i.e. 548321 + 8 = 548329 
    Branch target address = 548329 – 29 = 548300.
    View all questions of this test
    Most Upvoted Answer
    A PC-relative mode branch instruction is 8 bytes long. The address of ...
    Unknown.

    To find the branch target address, we need to first determine the signed displacement in the instruction. Since the instruction is 8 bytes long, the displacement is the last 6 bits of the instruction (bits 0-5), shifted left by 2 bits.

    Let's assume that the displacement is stored in two's complement form. To convert the displacement to decimal, we first need to determine the sign of the displacement. The sign bit is the 6th bit (bit 5) of the instruction. If it is 1, then the displacement is negative; if it is 0, then the displacement is positive.

    Let's say the sign bit is 1, indicating a negative displacement. To convert the displacement to decimal, we first need to invert all the bits and add 1 (this is the process for converting from two's complement to decimal). Then, we shift the result right by 2 bits, since the displacement is stored left-shifted by 2 bits.

    So, let's assume the displacement is 0b111111 (binary). Inverting the bits gives us 0b000000, and adding 1 gives us 0b000001. Shifting this result right by 2 bits gives us 0b0000, which is decimal 0.

    Therefore, the branch target address is the address of the instruction plus the displacement (in bytes), which is 548321 + 0 = 548321.
    Explore Courses for Computer Science Engineering (CSE) exam

    Similar Computer Science Engineering (CSE) Doubts

    Top Courses for Computer Science Engineering (CSE)

    A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer?
    Question Description
    A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer?.
    Solutions for A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
    Here you can find the meaning of A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer?, a detailed solution for A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? has been provided alongside types of A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A PC-relative mode branch instruction is 8 bytes long. The address of the instruction, in decimal, is 548321. Find the branch target address if the signed displacement in the instruction is –29.Correct answer is '548300'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
    Explore Courses for Computer Science Engineering (CSE) exam

    Top Courses for Computer Science Engineering (CSE)

    Explore Courses
    Signup for Free!
    Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
    10M+ students study on EduRev