Consider an 8-bit bit vector that represents the availability of 8 instruments (numbered 7 through 0) in a lab, where a bit is 1 if the instrument is available, and 0
Consider an 8-bit bit vector that represents the availability of 8 instruments
(numbered 7 through 0) in a lab, where a bit is 1 if the instrument is available, and 0
if the instrument is being busy (or being used). When a student enters the lab, the
AVAILABILITY bit vector is xCD. i. Which instruments are available for use? ii. The student decides to use instrument 2. What bit mask and operation do you
need to perform on the AVAILABILITY bit vector to update it, without unnecessarily affecting the other bits of the bit vector. iii. [Do this part after part (ii) above]. What bit mask and operation do you need to
perform on the AVAILABILITY bit vector if instruments 4 and 5 now become
available? Assume that the student from step (ii) is still using instrument 2.
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"
