When a binary shift operation is performed binary data can be shifted right or l
ID: 3885504 • Letter: W
Question
When a binary shift operation is performed binary data can be shifted right or left and a '0' is brought to fill vacated positions while the bit that is shifted out is discarded. Shift the 8-bit binary number that is equivalent to 0x18 right two, give the result in binary. When a binary rotate operation is performed binary data can be shifted right or left: the bit that is shifted out from one end will be brought back in on the other end. Rotate the 8-bit binary number that is equivalent to 0x5B left two, give the result in binary. For an 8-bit (byte) sized binary number, what mask and operation would you use to clear the lower nibble without changing the upper nibble? Mask (in binary) OperationExplanation / Answer
15. Binary equivalent of 0x18 would be 00011000. Shifting it right by one would make the number as 00001100. Shifting it right another time would make the number as 00000110. It's hex equivalent would be 0x06.
16. Binary equivalent of 0x5B would be 01011011. Rotating it left by one would make the number as 10110110. Rotating it left by another time would make the number as 01101101. It's hex equivalent would be 0x6D.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.