Implemented right_shift function for shifting values to right.