Answer the question
In order to leave comments, you need to log in
Operations AND, OR, XOR How to check bits?
Please explain how to check the bits because I didn’t find anything sensible on the Internet
There is an example in the lecture, but it’s not clear what is done and how.
Where does the value 34 come from?
From the lecture:
I tried to do my lecture assignment, but I really didn’t understand anything.
I have a task: to check the state of the n-1st and n-th bits of A; turn off the 2nd and 7th bits of B;
turn on the 3rd and 4th bits of A; toggle nth bit B;
Judging by the material from the lecture:
So I should write:
A=230
n=2
X AND (2^1+2^2) OR X AND 230
B=221
X AND (255–2^2–2^7) OR X AND 221
X OR (2^3+2^4) OR X OR 230
X XOR (2^2) OR X OR 221
Answer the question
In order to leave comments, you need to log in
X AND (2^1+2^2) OR X AND 230
X AND (255–2^2–2^7) OR X AND 221
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question