Excel BITLSHIFT Function
The BITLSHIFT function returns a decimal number shifted left by a specified number of bits.
The BITLSHIFT function returns a numeric value.
- The shift_amount argument can be positive or negative. When the shift_amount is a positive integer, the bits are shifted to the left, while the shift_amount is a negative integer, the bits are shifted to the right.
- When the BITLSHIFT function shifts the bits to the left, zero(s) will be added to the right of the binary representation of the number. Vice vera.
- The #NUM! error value occurs if:
- number is not an integer.
- number < 0 or > (2^48)-1.
- the absolute value of Shift_amount > 53.
- The #VALUE! error value occurs if any of the supplied arguments are non-numeric.
Supposing, you want to get the decimal number shifted left or right by a specified number of bits in the table below. Please do as follows.
1. Copy the formula below into cell E5.
=BITLSHIFT (B5, C5)
2. Then drag the fill handle down to the cells you want to apply this formula too. The results are as the following screenshot shows.
- We can directly input values in the two arguments in the formula. For example, the formula in cell E5 can be changed to:
=BITLSHIFT (6, -2)
Excel EVEN Function
The EVEN function rounds numbers away from zero to the nearest even integer.
Excel EXP Function
The EXP function returns the result of the constant e raised to the nth power.