How do shift operators work in Java? [duplicate]
This question already has an answer here: What are bitwise shift (bit-shift) operators and how do they work? 9 answers I am trying to understand the shift operators and couldn't get much. When I tried to execute the below code System.out.println(Integer.toBinaryString(2 << 11)); System.out.println(Integer.toBinaryString(2 << 22)); System.out.println(Integer.toBinaryString(2 << 33)); System.out.println(Integer.toBinaryString(2 << 44)); System.out.println(Integer.toBinaryString(2 << 55)); I get the below 1000000000000 100000000000000000000000 100 10000000000000 1000000000000000000000000 Could