+ 6
Why this happens
15^9 returns 6 https://code.sololearn.com/W5UnLs42v0RH/?ref=app
5 odpowiedzi
+ 4
It's bitwise "XOR" operator => "^". 15 in decimal is 1111 in binary, 9 in decimal is 1001 in binary. XOR compares bit by bit the two numbers and return on the certain position 1 only if one of the bits is 1 but not both. So
1111
^1001
_______
0110
The decimal representation of 0110 is 6 so that is the answer. You can find more info here: https://www.w3schools.com/js/js_operators.asp.
+ 2
Here.it is works as bitwise"xor"operator.thats why u get 6.if u want to multiply then use *or if u want to square it then use **.like 2**3=8
0
This is a game of bitwise opperators
0
15/9 9*1=9 and 6 is remaining