Question: 4. This question is on the SRC shift instructions and logical instructions. You also need to know the conversion between binary and hexadecimal numbers. If

 4. This question is on the SRC shift instructions and logical

4. This question is on the SRC shift instructions and logical instructions. You also need to know the conversion between binary and hexadecimal numbers. If you are not familiar with hexadecimal numbers, please read the short tutorial given at the end of this assignment. Assume that registers r, r2 and r3 contain the 32-bit numbers (in Hex) and 0001, respeetively 89AB0000, ABCD0000 and CDEF0001, respectively. The following SRC instructions are executed in sequence (that is, one after the other): shl rl, r2, 13 shr r2, rl, 5 shc r2, rl, 17 shra r, r2, r3 and r, r2, r3 or rl, r2, r3 shr rl, r2,3 Note: The numbers 13, 5,17 are decimal Show the contents of the registers rl, r2 and r3 in Hex after each one of these instructions is executed and also the final values in the registers after all the instructions are executed. A Short Tutorial on Hexadecimal (Hex) numbers Hexadecimal numbers have 16 digits which are represented by 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. A 4-bit binary number can be represented by the equivalent hexadecimal digit as given in the table below: Binary Hex ex 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 1001 1010 1011 1100 1101 1110 A binary number of any length can be converted into a hexadecimal number by writing groups of 4 bits with its equivalent Hex notation. In a similar way, a Hex number can be converted into binary by writing the 4-bit equivalent of each Hex digit. Example 1: The 16-bit binary number 0000 0101 1110 in Hex is 05EF 1101 Example 2: The Hex number 1FDEC02A is equivalent to the 32-bit binary number 000 110 1100 0000 0010 1010 Example 3: The 5-bit binary number 11010 can also be converted into Hex by prepending three zeros to the front of the binary number to convert it into an 8-bit number. This will not change its value. Thus 11010 becomes 00011010. Now it can be written as 0001 1010 or 1A in Hex 4. This question is on the SRC shift instructions and logical instructions. You also need to know the conversion between binary and hexadecimal numbers. If you are not familiar with hexadecimal numbers, please read the short tutorial given at the end of this assignment. Assume that registers r, r2 and r3 contain the 32-bit numbers (in Hex) and 0001, respeetively 89AB0000, ABCD0000 and CDEF0001, respectively. The following SRC instructions are executed in sequence (that is, one after the other): shl rl, r2, 13 shr r2, rl, 5 shc r2, rl, 17 shra r, r2, r3 and r, r2, r3 or rl, r2, r3 shr rl, r2,3 Note: The numbers 13, 5,17 are decimal Show the contents of the registers rl, r2 and r3 in Hex after each one of these instructions is executed and also the final values in the registers after all the instructions are executed. A Short Tutorial on Hexadecimal (Hex) numbers Hexadecimal numbers have 16 digits which are represented by 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. A 4-bit binary number can be represented by the equivalent hexadecimal digit as given in the table below: Binary Hex ex 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 1001 1010 1011 1100 1101 1110 A binary number of any length can be converted into a hexadecimal number by writing groups of 4 bits with its equivalent Hex notation. In a similar way, a Hex number can be converted into binary by writing the 4-bit equivalent of each Hex digit. Example 1: The 16-bit binary number 0000 0101 1110 in Hex is 05EF 1101 Example 2: The Hex number 1FDEC02A is equivalent to the 32-bit binary number 000 110 1100 0000 0010 1010 Example 3: The 5-bit binary number 11010 can also be converted into Hex by prepending three zeros to the front of the binary number to convert it into an 8-bit number. This will not change its value. Thus 11010 becomes 00011010. Now it can be written as 0001 1010 or 1A in Hex

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!