question: public void testZeroNeg ( ) { byte aBytes [ ] = { 0 } ; byte bBytes [ ] = { - 2 , - 3 , - 4 , - 4 , 5 , 14 , 23 , 39 , 48 , 57 , 66 , 5 , 14 , 23 } ; int aSign = 0 ; int bSign = - 1 ; byte rBytes [ ] = { - 1 , 1 , 2 , 3 , 3 , - 6 , - 15 , - 24 , - 40 , - 49 , - 58 , - 67 , - 6 , - 15 , - 23 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger bNumber = new BigInteger ( bSign , bBytes ) ; BigInteger result = aNumber . or ( bNumber ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , - 1 , result . signum ( ) ) ; }
target:  Or for zero and a negative number