This section works with the binary of the numbers, you must understand the functioning of each one:
1) The symbol "|" means "OR inclusive" and what it does is as follows::
Makes the value of the bit equal to 1 if one or both of the corresponding bits in the operands is 1 and 0 in the other cases. Example: if the variable var has the value 12 (00001100) and doing the operation with 6 (00000110), the result, var | 6, will be 14 (00001110).
2) The symbol "<<" means "left shift" and what it does is as follows::
Move the left operand bits in the value given by the right operand to the left operand. It is equal to the multiplication by the power of 2 given by the latter. Example: if variable var has value 3 (00000011), after var << 2, it will be 12 (00001100).
So what your code is doing is about that:
teste = ((x0|x2) | (x1|x2) << 1);
teste = ((00000000|00000001) | (00000000|00000001) << 00000001);
teste = (00000001 | 00000001 << 00000001);
//O operador << tem precedência, então neste momento ele é executado primeiro
teste = (00000001 | 00000001 << 00000001);
teste = (00000001 | 00000010);
teste = (00000011);
teste = (3);
If you still have questions with any other type of operator, this page http://www.mspc.eng.br/info/cpp_oper_10.shtml explains well the functioning of each.
Windows calculator in "programmer mode" can greatly help the visualization of these bit displacement functions
– Cleiton Santoia Silva