(Solved) : Bitwise Operations Bitwise Operators Xor Allow Bits Reset 0 Set 1 Inverted 0 1 1 0 Bit Ma Q35962544 . . .
Bitwise Operations The bitwise operators AND, OR, and XOR allowfor bits to be reset (to 0), set (to 1), and inverted (from 0 to 1,and from 1 to 0). Bit masks are strings of bits that allow for asingle bitwise operation on particular bits. Commonly a bit stringis 8 bits long (referred to as a byte). Conventionally, bit stringsare indexed from 0 staring with the rightmost digit.
Let A = xxxx xxxx 2 , where each x is a unique bit (0 or 1).
Byte A x x x x x x x x
Bit position 7 6 5 4 3 2 1 0
Find the appropriate bitmask(s) M and bitwise operator(s) forALL byte A for the following cases, showing all your working outand intermediate steps:
a. Set bits 0 and 6, and reset all other bits.
b. Invert the values (the opposite of what it currently is) ofbits 2, 3, 4, and 5, and leave the 2 bits on each side (bits 0, 1,6, and 7) untouched.
Expert Answer
Answer to Bitwise Operations Bitwise Operators Xor Allow Bits Reset 0 Set 1 Inverted 0 1 1 0 Bit Ma Q35962544 . . .
OR