Cannot get this simple calculation straight using visual studio 2010

```
std::cout<<(1 | 1 & 2);    

//gives the value 1, was expecting 2 since 1 | 1 = 2 , the & 2   gives 2

std::cout<<( (1 | 1) & 2); 

//gives the value 0, why is this different from above?

```