Update Bitwise Operations in Java