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...


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

Extracted 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

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here