`Hi could someone explain me how to use the operator "^" ?`

# General help : operator

**stetim94**#4

if you post under 1. python syntax, i didn't assume you where working on bit wise operators. Does this involve an exercise? If so, do you have the url?

thank you for your answer . No I ve ended yesterday the last python chapter i am working alone ...

is this a problem? I thought that it could be useful for all that's why I ve asked here on the general operator..

**stetim94**#8

But its covered in the lesson, and there is plenty documentation. What exactly is your question?

sorry i didn't find any clear answer.. I don't understand how to use this and how this work ( ^ )

**stetim94**#10

so what is in the exercise:

The XOR (^) or exclusive or operator compares two numbers on a bit level and returns a number where the bits of that number are turned on if either of the corresponding bits of the two numbers are 1, but not both.

```
a: 00101010 42
b: 00001111 15
================
a ^ b: 00100101 37
```

wasn't clear, but you did pass it?

the exclusive or operator returns 1 if either is one, but not both:

```
0^1 = 1
1^0 = 1
0^0 = 0
1^1 = 0
```

thank you @stetim94 for your answer, it s very clear now ..

i found the solution on github but before pass the exercice i wanted to understand ..

if I have other question , can I ask here ?

**system**#13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.