The following figure shows a RISC-V Assembly code a long with the contents of the data memory (i.e. from address 0 to address 12) and the contents of register x26. Accordingly, choose the correct answer for the questions below. PC Instruction Data Memory lui x6 , 0x 95ABC 40 Address Content 12 Ox98 44 addi xS, x6, Ox D12 11 Ох76 48 blt x5, x7, Exit 10 Ox54 52 beg x5, x7, 10 Ox32 (x26) = 0x FFFF AAAA 1122 7790 56 sli x21, x20, 3 8 Ox10 add x21, x21, x11 Id x7,0 (x21) jal x0,-10 addi x10, x10, 1 Exit: sw x26, 6(x0) jalr x0, 200 (x0) 60 OXEF 64 OXCD 68 OXAB 72 4 Ox89 76 3. Ox67 Ox45 80 Ox23 Ox01 1) What is the value of register x5 after executing the code? OXFFFF FFFF 95AB CD12

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
The following figure shows a RISC-V Assembly code a long with the contents of the data
memory (i.e. from address 0 to address 12) and the contents of register x26. Accordingly,
choose the correct answer for the questions below:
PC
Instruction
Data Memory
40
lui x6, Ox 95ABC
Address
Content
12
Ox98
44
addi x5, x6, Ox D12
11
Ox76
48
bit x5, x7, Exit
10
Ox54
52
beg x5, x7, 10
Ox32
56
slli x21, x20, 3
(x26) = Ox FFFF AAAA 1122 7790
Ox10
60
add x21, x21, x11
OXEF
Id x7, 0 (x21)
jal x0,-10
64
OXCD
68
OXAB
72
addi x10, x10, 1
Ox89
76
Exit: sw x26, 6(x0)
3.
Ox67
jalr x0, 200 (x0)
80
Ox45
Ox23
Ox01
1) What is the value of register x5 after executing the code?
OXFFFF FFFF 95AB CD12 +
2) When converting the branch instruction at PC = 48 to machine code, what would be the
value of label "Exit" in the instruction? (All the following answers are in decimal format).
14
3) Which instruction is executed after the "jal x0,-10?
blt x5, x7, Exit
4) What the value of the memory location at address 9 after executing the code?
OXx79 +
5) What is the PC of the instruction executed after the "jalr x0, 200 (x0)?
200 •
Transcribed Image Text:The following figure shows a RISC-V Assembly code a long with the contents of the data memory (i.e. from address 0 to address 12) and the contents of register x26. Accordingly, choose the correct answer for the questions below: PC Instruction Data Memory 40 lui x6, Ox 95ABC Address Content 12 Ox98 44 addi x5, x6, Ox D12 11 Ox76 48 bit x5, x7, Exit 10 Ox54 52 beg x5, x7, 10 Ox32 56 slli x21, x20, 3 (x26) = Ox FFFF AAAA 1122 7790 Ox10 60 add x21, x21, x11 OXEF Id x7, 0 (x21) jal x0,-10 64 OXCD 68 OXAB 72 addi x10, x10, 1 Ox89 76 Exit: sw x26, 6(x0) 3. Ox67 jalr x0, 200 (x0) 80 Ox45 Ox23 Ox01 1) What is the value of register x5 after executing the code? OXFFFF FFFF 95AB CD12 + 2) When converting the branch instruction at PC = 48 to machine code, what would be the value of label "Exit" in the instruction? (All the following answers are in decimal format). 14 3) Which instruction is executed after the "jal x0,-10? blt x5, x7, Exit 4) What the value of the memory location at address 9 after executing the code? OXx79 + 5) What is the PC of the instruction executed after the "jalr x0, 200 (x0)? 200 •
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY