Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

i only need help on number 3. the first picture is the assignment and the other

ID: 3825168 • Letter: I

Question


i only need help on number 3. the first picture is the assignment and the other 2 pictures are my work for questions 1 and 2. i do not know what the answer is for number 3 can you help me? ENGR-2332-HW 4-042017 Instructor: Dr. Intekhaab Siddiquee Due: April 20, 2017 1. Starting from the 8-bit operand the values obtained after sequential application of each shift microoperation, both left and right, until the contents are all zeros, 2. What is the mask and the operation that needed to be used to change the contents of a register whose current content is 01110 to invert all ths alternate bits (starting from the MsB b) to all the alternate bits to 0 (starting from the MsB). c) to set all the even bits to 1 (starting from the MSB). 3 you want to the ef bits of a 16 bit register, what is/are the operations you need to do to replace 7th 8th 9th and 11th bits by 0,1,1,0

Explanation / Answer

Suppose you want to replace the contents of selected bits of a 16 bit register.
What is/are the operations you need to do to replace 7th, 8th, 9th, and 11th bits by
0, 1, 1, 0 respectively?
So, when you want to replace 1's in specified bits you have to do the OR operation with
1's in those particular bit positions and 0's in the remaining bits.
Where as, when you want to replace 0's in a specified bits you have to do the AND operation
with 0's in those particular bit positions and 1's in the remaining bits.
So, to make the 8th, and 9th bit positions 1's lets do the first part:
If R is the register you want to modify with, then the step is:
R = R | 0000 0001 1000 0000 //Will replace the 8th, and 9th position bits with 1's.
And now, to make the 7th, and 11th bit positions 0's lets do the second part:
If R is the now modified register, you want to re-modify, then the step is:
R = R & 1111 1101 1101 1111 //Will replace the 7th, and 11th position bits with 0's.