Please answer all the questions! Thank you.
We are allowed to answer 4 sub parts only. So, I answered 3a, 3b, 4a and 4b. Please post accordingly.
Base-16 to base-2
Take each one in base-16 and change it to equivalent 4 bit in
base-2
Hex values
A - 1010
B - 1011
C - 1100
D - 1101
E - 1110
F - 1111
3.a) ABCD = 1010 1011 1100 1101
3.b) 1DEF = 0001 1101 1110 1111
Base-10 to unsigned base-2
4.a)
4.b)
--------------------------------------
We are allowed to answer 4 sub parts only. So, I answered 3a, 3b,
4a and 4b. Please post accordingly.
Please answer all the questions! Thank you. For the following C statement, what would be the corresponding MIPS assembly...
Assembly Langauge. Q6. (4 marks) : For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables a, b, and c are assigned to register $s0, $s1, and $s2, respectively.
For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables i, and j are assigned to registers $s0, $s1, respectively. Assume that the base address of the arrays A and B are in registers $s2 and $s3, respectively. B[i] = A[i] - 10
Assume that registers $s0 and $s1 hold the values 8000000016 and D000000016, respectively. a. What is the value of $t0 for the following assembly code? add $t0, $s0, $s1b. Is the result in $t0 the desired result, or has there been overflow?c. For the contents of registers $s0 and $s1 as specified above, what is the values of $t0 for the following assembly code? sub $t0, $s0, $s1d. Is the result in $t0 the desired result, or has there been...
For the following C statement, what is the corresponding MIPS assembly code? Assume the arrays hold 16-bit integer values, $ s0 is the base for array X, $ s1 is the base for array Y, and $ t0 and $ t1 are index variables i and j respectively. Comment code X [j] = Y [i + j];
Please answer the following questions involving MIPS assembly code: A) For the C statement below, what is the corresponding MIPS assembly code? Assume f, g are stored in S1 and S2. f = g + (-f -5) B) For the C statement below, what is the corresponding MIPS assembly code? Assume i and j are assigned in registers S1 and S2 respectively and base of address of arrays A and B are in registers S6 and S7. B[8] = A[i...
Assume that the variables i, and j are assigned to registers $s0, $s1, respectively. Assume that the base address of the arrays A and B are in registers $s2 and $s3, respectively. B[i] = A[i] - 10
For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables i andj are assigned to registers $50 and $s1, respectively and the base address of the arrays A and B are in registers $s6 and $57, respectively. B[i] = A[B[j]+12];
1. Convert the following C statement to MIPS code. Assume x, y and z are assigned to registers $s0, $s1 and $s2 respectively and the starting address of array A is $s6. x = y + z + A[3] 2. 2.Convert the following C statement to MIPS code. Assume the base address of array A is $s3 and h is assigned to register $s2 . A[7] = h + A[7]
3. For the following C statement what is the corresponding MIPS assembly code? A[24] = h + A[16]; Assume variable h to $51, base address of A in $s2. 4. Suppose $t1 initially contains Ox3A67AB25. C. After following code runs on big-endian system, what value is $50? d. In a little-endian system? sw $t1, 0($0) Ib $50, 1($0)
2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers. a. 110101 b. 01101010 c. 10110101 3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Write the results in 6-bit two's complement binary number format and decimal number format. Indicate whether or not the sum overflows a 6-bit result. a. 14 + 12 b. 30 + 2 C. -7 + 20 d. -18-17 4. What is the signed/magnitude and two's complement range of...