## Bit problems .....

Moderator: Benj

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Bit problems .....

Can't compare the bits of the variable...
What am I doing wrong?
Attachments
UU
UUUUU.jpg (22.27 KiB) Viewed 2176 times
BB
BOOL.jpg (23.53 KiB) Viewed 2176 times

Lagoda
Posts: 153
Joined: Fri Jul 15, 2016 9:51 pm
Contact:

### Re: Bit problems .....

Hi Osta,

I think that's a good result.

0b00000001 and 0b00110010 =0b00000000,
0b00000001 and 0b00011001=0b00000001,
0b00000000 or 0b00000001=0b00000001.

Regards,

Lagoda

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Hi Lagoda!!!
No difference.....
Attachments
Ha
Ha.jpg (16.98 KiB) Viewed 2167 times
oo
OO.jpg (31.92 KiB) Viewed 2167 times

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

No difference...
Attachments
rez
Rez.jpg (19.53 KiB) Viewed 2166 times
5
N5.jpg (31.43 KiB) Viewed 2166 times

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Need to do two or
Attachments
or
OR.jpg (12.9 KiB) Viewed 2164 times

Lagoda
Posts: 153
Joined: Fri Jul 15, 2016 9:51 pm
Contact:

### Re: Bit problems .....

Hi Osta,

What value do you want to get as a result?
Do you agree with the way I described the calculation?

Lagoda

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Рш Lagoda!
Yes, I agree!!!
I have kontralirovat selectively a few bits of one variable.

Lagoda
Posts: 153
Joined: Fri Jul 15, 2016 9:51 pm
Contact:

### Re: Bit problems .....

Hi Osta,

What value do you want to get as a result?
Do you agree with the calculation method that I described?

Lagoda

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Hi Lagoda!
Variable check on several masks xor , or.

Lagoda
Posts: 153
Joined: Fri Jul 15, 2016 9:51 pm
Contact:

### Re: Bit problems .....

Hi Osta,

I think the operator of XOR is "^". The operator of OR is "|".

Lagoda

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Example
Attachments
xor
XOR.jpg (118.4 KiB) Viewed 2149 times

Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Contact:

### Re: Bit problems .....

Thank You, Lagoda!!
I realized my mistake...

Lagoda
Posts: 153
Joined: Fri Jul 15, 2016 9:51 pm
Contact: