Arithmetic operator priority, bug?

According to Powershell documentation at, the operator -bor has higher priority than the operator -shl.
Which means that
8 -shl 2 -bor 1
should be evaluated as
8 -shl (2 -bor 1) , with a value of 64
But it is rather evaluated as
(8 -shl 2) -bor 1, with a value of 33
Clearly, the operator -shl here has higher priority than the operator -bor, which contradicts the documentation.
Is this a bug, or a documentation error? If the latter is true, can someone point me to a correct documentation page?
Thank you.

Same issue for
3 -bor 3 -band 2
Evaluated as (3 -bor 3) -band 2 = 2
Rather than 3 -bor (3 -band 2) = 3

They are of equal precedence according to the docs:

I think that’s why.

1 Like