1. Assume you have an unsigned 8-bit binary number b (the value does not matter) and that you wish to negate the number b. For example, if the value is 100 01 101, the result will be 0 1110010. What is the mask that will accomplish this and the operation that must be performed? a) 11111111, OR operation b) 0 0 000000, XOR operation c) 111111 00, AND operation d) 11111111, XOR operation 2. Assume that the register x5 stores the value 12. The value in x5 will be () after the following operation is executed: slli x5, x5, 2 a) 6 b) 24 c) 48 d) 36 3. Add the 8-bit numbers 01101111 + 0110 1010. To calculate the result of the addition (as a binary value), please figure out whether overflow occurred if the numbers were treated as signed, and whether overflow occurred if the numbers were treated as unsigned. a) Signed Overflow: Yes; Unsigned Overflow: Yes b) Signed Overflow: No; Unsigned Overflow: No c) Signed Overflow: No; Unsigned Overflow: Yes d) Signed Overflow: Yes: Unsigned Overflow: No 4. After the execution of the following instructions, please determine the value of the top of the stack. add x8, Ã-0, x0 addi x9, Ã-0, 1 addi sp, sp, -8 sd x8, 0(sp) sd x9, 0(sp) a) 0 b) 1 c) -4 d) 4

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
1. Assume you have an unsigned 8-bit binary number b (the value does
not matter) and
that you wish to negate the number b. For example, if the value is 100
01 101,
the result will be 0 1110010.
What is the mask that will accomplish this and the operation that must
be
performed?
a) 11111111, OR operation
b) 00000000, XOR operation
c) 111111 00, AND operation
d) 11111111, XOR operation
2. Assume that the register x5 stores the value 12. The value in x5 will
be () after the
following operation is executed: slli x5, x5, 2
а) 6
b) 24
c) 48
d) 36
3. Add the 8-bit numbers 0110 1111 + 0110 1010. To calculate the
result of the
addition (as a binary value), please figure out whether overflow
occurred if the
numbers were treated as signed, and whether overflow occurred if the
numbers were
treated as unsigned.
a) Signed Overflow: Yes; Unsigned Overflow: Yes
b) Signed Overflow: No; Unsigned Overflow: No
c) Signed Overflow: No; Unsigned Overflow: Yes
d) Signed Overflow: Yes: Unsigned Overflow: No
4. After the execution of the following instructions, please determine
the value of the
top of the stack.
add x8, Ã-0, x0
addi x9, Ã-0, 1
addi sp, sp, -8
sd x8, 0(sp)
sd x9, 0(sp)
а) 0
b) 1
c) -4
d) 4
Transcribed Image Text:1. Assume you have an unsigned 8-bit binary number b (the value does not matter) and that you wish to negate the number b. For example, if the value is 100 01 101, the result will be 0 1110010. What is the mask that will accomplish this and the operation that must be performed? a) 11111111, OR operation b) 00000000, XOR operation c) 111111 00, AND operation d) 11111111, XOR operation 2. Assume that the register x5 stores the value 12. The value in x5 will be () after the following operation is executed: slli x5, x5, 2 а) 6 b) 24 c) 48 d) 36 3. Add the 8-bit numbers 0110 1111 + 0110 1010. To calculate the result of the addition (as a binary value), please figure out whether overflow occurred if the numbers were treated as signed, and whether overflow occurred if the numbers were treated as unsigned. a) Signed Overflow: Yes; Unsigned Overflow: Yes b) Signed Overflow: No; Unsigned Overflow: No c) Signed Overflow: No; Unsigned Overflow: Yes d) Signed Overflow: Yes: Unsigned Overflow: No 4. After the execution of the following instructions, please determine the value of the top of the stack. add x8, Ã-0, x0 addi x9, Ã-0, 1 addi sp, sp, -8 sd x8, 0(sp) sd x9, 0(sp) а) 0 b) 1 c) -4 d) 4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

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