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

16) Use masking to change only the highlighted bits in the following 8 bit binar

ID: 3749565 • Letter: 1

Question

16) Use masking to change only the highlighted bits in the following 8 bit binary numbers. You will need to pick a suitable Boolean operation and a binary value to achieve the desired results Show what Boolean Operator you used, what binary number you used, and what your result was. All binary numbers should be written as 8 bit binary numbers. a. 10001012 Change the one to a zero. b. 100110012 Change the zero to a one. c. 010011012 Change the zeros to ones. d. 101111012 Change the ones to zeros e. 101110012 Invert the highlighted bits in one operation.

Explanation / Answer

Answer is as follows :

a) 11000101 , change bold bit 1 to 0

So you have to perfrom AND operation with 0 1111111.

and you get the answer 0 1000101. Bit is changed to 0.

b) 10 0 11001, change bold bit 0 to 1.

You have to perfrom, OR operation with 00 1 00000.

and you will get the answer as follows 10 1 11001. Bold Bit is changed.

c) 010 0 11 0 1, changes bold bits to ones.

You have to perfrom OR operaation with 000 1 00 1 0

and you will get the following answer 010 1 11 1 1. Bold bits are changed.

d) 10 11 1 1 01, changed the bold bits to zeros.

perfrom AND operation with 11 00 1 0 11.

and you will get the answer as 10 00 1 0 01.

e) 10 1 1 1 0 0 1

You have to perfrom   XOR operation by remain changed bits as same and other bits are changed to opposite one as follows : 01 1 0 1 1 0 0

After perfroming X-OR operation u get

10 0 1 0 0 1 1, inverting bold bits.

if there is any query please ask in comments...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote