Complete the following table using the codes attributed. Provide how many instructions of the given categories are executed while finding the F(6) and calculate the total clock cycles.
Complete the following table using the codes attributed. Provide how many instructions of the given categories are executed while finding the F(6) and calculate the total clock cycles.
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...
Related questions
Question
100%
Complete the following table using the codes attributed. Provide how many instructions of the given categories are executed while finding the F(6) and calculate the total clock cycles.
Category | Instructions | CPI(Clock Cycle per Instruction) | Instruction Count |
A: Arithmetic and Comparison | add, addu, sub, slt, etc.. | 1 | ? |
B: Memory | lw, sw | 8 | ? |
D: Branch and Jump | beq, bnq, j, jal | 2 | ? |
![45 beqz $a0,zero
46 beg $a0,1,one
47
48
49
sub $ sp,$ sp,4
50
sw $ra,0($ sp)
51
52
sub $a0,$ a0,1
53
jal F
54
add $a0,$ a0,1
55
lw $ra,0($ sp)
56
57
add $sp,$ sp,4
58
59
60
sub $ sp,$ sp,4
61
sw $v0,0($sp)
62
sub $ sp,$ sp,4
sw $ra,0($ sp)
63
64
65
66
sub $a0,$ a0,2
67
jal F
68
add $a0,$ a0,2
69
70
lv $ra,0($ sp)
71
add $sp,$ sp,4
72
lv $s7,0($ sp)
add $ sp,$ sp,4
73
74
75
76
add $v0,$v0,$s7
77
jr $ra
78
79
zero:
80
li $v0,0
81
jr $ra
82
one:
83
li $v0,1
84
jr $ra
85
86
. data
87
prompt: . asciiz "
Program calculates the
Fibonacci sequence using recursive functions. \n Enter a non-negative number: "
88
result:
.asciiz "F "
result2: . asciiz "
asciiz "n".
89
endl:](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd2bc9416-ce19-4f0d-b43c-619c4ee422d1%2F7007f258-643c-4a4b-8ea9-cba1f46355e2%2Feab3lum_processed.png&w=3840&q=75)
Transcribed Image Text:45 beqz $a0,zero
46 beg $a0,1,one
47
48
49
sub $ sp,$ sp,4
50
sw $ra,0($ sp)
51
52
sub $a0,$ a0,1
53
jal F
54
add $a0,$ a0,1
55
lw $ra,0($ sp)
56
57
add $sp,$ sp,4
58
59
60
sub $ sp,$ sp,4
61
sw $v0,0($sp)
62
sub $ sp,$ sp,4
sw $ra,0($ sp)
63
64
65
66
sub $a0,$ a0,2
67
jal F
68
add $a0,$ a0,2
69
70
lv $ra,0($ sp)
71
add $sp,$ sp,4
72
lv $s7,0($ sp)
add $ sp,$ sp,4
73
74
75
76
add $v0,$v0,$s7
77
jr $ra
78
79
zero:
80
li $v0,0
81
jr $ra
82
one:
83
li $v0,1
84
jr $ra
85
86
. data
87
prompt: . asciiz "
Program calculates the
Fibonacci sequence using recursive functions. \n Enter a non-negative number: "
88
result:
.asciiz "F "
result2: . asciiz "
asciiz "n".
89
endl:
![.text
2
main:
4
la $a0,prompt
li $v0,4
syscall
7
li $v0,5
syscall
10
11
move $t2,$vo
12
13
14
move $a0,$t2
15
move $v0,$t2
16
jal F
17
move $t3,$vo
18
la $a0,result
li $v0,4
19
20
21
syscall
22
23
move $a0,$t2
24
li $v0,1
25
syscall
26
27
la şa0,result2
28
li $v0,4
29
syscall
30
31
move şa0,$t3
32
li $v0,1
33
syscall
34
la $a0,endl
li $v0,4
35
36
37
syscall
38
39
40
li $v0,10
41
syscall
42
43
F:
44
45 begz $a0,zero](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd2bc9416-ce19-4f0d-b43c-619c4ee422d1%2F7007f258-643c-4a4b-8ea9-cba1f46355e2%2Fb469wz5_processed.png&w=3840&q=75)
Transcribed Image Text:.text
2
main:
4
la $a0,prompt
li $v0,4
syscall
7
li $v0,5
syscall
10
11
move $t2,$vo
12
13
14
move $a0,$t2
15
move $v0,$t2
16
jal F
17
move $t3,$vo
18
la $a0,result
li $v0,4
19
20
21
syscall
22
23
move $a0,$t2
24
li $v0,1
25
syscall
26
27
la şa0,result2
28
li $v0,4
29
syscall
30
31
move şa0,$t3
32
li $v0,1
33
syscall
34
la $a0,endl
li $v0,4
35
36
37
syscall
38
39
40
li $v0,10
41
syscall
42
43
F:
44
45 begz $a0,zero
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY