> while using shift operator the integer is first
> converted in its binary representation.
No. Everything is always binary.
> but how do we
> know whether we have to represent it in 1 byte or 16
> byte or like this.
The Java Language Specification defines the number of bits for each primitive.