negative data with left shift, use cast or multiplication instead

negative value with left shift operation, replace with multiplication.
add cast operation to indicate bit-wise operation.