leftShift(): Shifting Integer Bits Left
leftShift() shifts an integer’s binary bits left by a specified count. For nonnegative integer arithmetic, shifting left by n generally multiplies by 2ⁿ, provided no fixed-width overflow rule changes the representation.
Bit-level caveats
Use integer operands and a nonnegative shift count. Bitwise operations operate on binary representations, not decimal digits. Compare it with rightArithShift() and rightLogShift(), which have different sign behavior.
Use bitAnd() to test flags and bitOr() to combine them. Confirm your target integer range before shifting large values, because precision and sign rules affect results.