public class Bitshift { public static void main(String[] args) { // x >> bits und x << bits // VERSCHIEBT die Zahl x um die angegebenen // Stellen nach rechts (durch 2 teilen) // oder links (mit 2 multiplizieren) int x = 4; System.out.println(x); System.out.println(x >> 1); // x / 2 System.out.println(x >> 2); // x / (2*2) System.out.println(x << 2); // x * (2*2) } }