Question: 15. Convert the following decimal integers to 8-bit 2's complement integers a. 18 b. -29 C. 127 d. -57 e. -128 16. Convert the following
15. Convert the following decimal integers to 8-bit 2's complement integers a. 18 b. -29 C. 127 d. -57 e. -128 16. Convert the following 8-bit 2's complement integers to decimal a. 0101 0111 b. 1001 0010 c1111 0101 d. 0001 0010 e. 1010 0101 17. Assuming 64-bit registers, x6-152, 5-8, the starting memory address is 152, and memory contains the nine sequential doublewords 0, 1, 2, 3, 4,5, 6,7, and 8. What is x5's value after executing ld x5, 8(x6)? 18. Assume x18 0123 4567 89AB CDEFas After x18 is stored to memory address 80sa, what byte will be storedat memory location 811? t 2's complement integer 100 is sign-extended to 8 bits, and then loaded into an 8-bit register X. What is the value of the 2's complement integer X? 20. There are only two B-bit 2's complement numbers X such that the (2's complement of x)-(x0, Express the two solutions in decimal. 21. What is the 1's complement of 1010 1010? 22. When adding two n-bit integers (unsigned or signed), what is meant by overflow? 23. Find -128 as an 8-bit 2's complement integer. 24. Find an instruction that will zero out all bits of 64-bit register x7 except Convert the 2's complement of your 8-bit answer to decimal. for bit 5 (bit 5 is to remain unchanged]? (Bits are numbered from left-to-right from 63-to-0 (or 63,62,. 6,5, 4,3,2,1,o)) Find an instruction that will togle bit 3 (if bit 3 s a 1 make it o,if a O make bit 3 a 1) of 64-bit register x6, leaving all other bits of x6 unchanged? (Bits are numbered from left-to-right from 63-to-0) ng that RISC-V does not have a not instruction, write one I-type (RISC.V) instruction that when executed will store the 1's complement of x5 (not x5) into x6. Page 3 of 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
