// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Shift {
   public static void main(String[] args) {
        byte b = (byte)0xFF;
        System.out.println((b >> 4) & 0x0F);
        System.out.println((b & 0xF0) >> 4);
        System.out.println((b & 0xF0) >>> 4);
        System.out.println(b >> 4);
        System.out.println(b >>> 4);
   }
}
