All pastes #206462 Raw Edit

Someone

public java v1 · immutable
#206462 ·published 2006-10-17 12:25 UTC
rendered paste body
public class Test {    public static void main(String[] args) {        byte  b1 = 33;        byte  b2 = 58;        short s1 = 431;        short s2 = 8731;                long n = 0;        n |= b1;        n |= s1 << 8;        n |= s2 << 24;        n |= b2 << 40;                byte  b1_ = (byte) (n & 0xFF);        byte  b2_ =  (byte) ((n >> 40) & 0xFF);        short s1_ = (short)((n >> 8)  & 0xFFFF);        short s2_ = (short)((n >> 24) & 0xFFFF);                // Why do they not equal at this point??        System.out.println(            b1 + " " + b1_ +"\n"+            b2 + " " + b2_ +"\n"+            s1 + " " + s1_ +"\n"+            s2 + " " + s2_ );                            }}