| java Programming Glossary: bitwiseWhy is processing a sorted array faster than an unsorted array? http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array  c This eliminates the branch and replaces it with some bitwise operations. Note that this hack is not strictly equivalent to.. 
 Java: What does ~ mean http://stackoverflow.com/questions/1483504/java-what-does-mean    share improve this question   The Tilde ~ performs a bitwise complement of a numerical value in Java. See Bitwise complement.. 
 Java: right shift on negative number http://stackoverflow.com/questions/15457893/java-right-shift-on-negative-number  number by 31 not 1 the sign bit  java bit manipulation bitwise operators bit shift negative number   share improve this question.. 
 In Java, why must equals() and hashCode() be consistent? http://stackoverflow.com/questions/1678205/in-java-why-must-equals-and-hashcode-be-consistent  mask is taken depending on the size of the buckets. If you bitwise AND the hashCode with 15 0x0F you will get the last 4 bits equaling.. 
 What does the ^ operator do in Java? http://stackoverflow.com/questions/1991380/what-does-the-operator-do-in-java  binary 5 101 6 110  xor 3 011 This the truth table for bitwise JLS 15.22.1 and logical JLS 15.22.2 xor ^ 0 1 ^ F T  0 0 1 F.. 
 BitSet to and from integer/long http://stackoverflow.com/questions/2473597/bitset-to-and-from-integer-long  set clear nextSetBit and nextClearBit methods rather than bitwise operators but I can't find an easy way to initialize a bit set.. 
 Fastest way to determine if an integer's square root is an integer http://stackoverflow.com/questions/295579/fastest-way-to-determine-if-an-integers-square-root-is-an-integer  the trick of reading individual bytes out of a word only bitwise and and shifts. int64 y x y y & 4294967295LL y 32 y y & 65535.. 
 Change private static final field using Java reflection http://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection  thus the new value may not be observable Appendix On the bitwise manipulation Essentially field.getModifiers ~Modifier.FINAL.. to Modifier.FINAL from field.getModifiers . is the bitwise and and ~ is the bitwise complement. See also Wikipedia Bitwise.. from field.getModifiers . is the bitwise and and ~ is the bitwise complement. See also Wikipedia Bitwise operation  share improve.. 
 Enumerations: Why? When? http://stackoverflow.com/questions/3363120/enumerations-why-when  often used e.g. in C to denote bit sets. This relies on bitwise operations . An example may look something like this public.. 
 Differences in boolean operators: & vs && and | vs || http://stackoverflow.com/questions/4014535/differences-in-boolean-operators-vs-and-vs  me with an example. Thank you in advance.  java operators bitwise operators boolean logic   share improve this question   Those.. logic   share improve this question   Those are the bitwise AND and bitwise OR operators. int a 6 110 int b 4 100 Bitwise.. improve this question   Those are the bitwise AND and bitwise OR operators. int a 6 110 int b 4 100 Bitwise AND int c a b.. 
 Why do we usually use `||` not `|`, what is the difference? http://stackoverflow.com/questions/7101992/why-do-we-usually-use-not-what-is-the-difference  why we usually use logical OR between two booleans not bitwise OR though they are both working well. I mean look at the following.. no pass Can we use instead of Same thing with and .  java bitwise operators   share improve this question   If you use the and.. 
 How does Java convert int into byte? http://stackoverflow.com/questions/842817/how-does-java-convert-int-into-byte  1 Unsigned 255 Whats actually happening here We are using bitwise AND to mask all of the extraneous sign bits the 1's to the left.. 
 Convert from byte array to hex string in java http://stackoverflow.com/questions/9655181/convert-from-byte-array-to-hex-string-in-java  arrays. Compared to the answer I took it from switching to bitwise ops as suggested in the discussion cut about 20 off of the time.. 
 Java: What does ~ mean http://stackoverflow.com/questions/1483504/java-what-does-mean  a bitwise complement of a numerical value in Java. See Bitwise complement ~ inverts ones and zeroes in a number  share improve.. 
 Effect of a Bitwise Operator on a Boolean in Java http://stackoverflow.com/questions/1724205/effect-of-a-bitwise-operator-on-a-boolean-in-java  of a Bitwise Operator on a Boolean in Java  The bitwise operators are supposed.. 
 Bitwise shift operators. Signed and unsigned http://stackoverflow.com/questions/2244387/bitwise-shift-operators-signed-and-unsigned  shift operators. Signed and unsigned  I'm practising for the.. 
 Explanation of HashMap#hash(int) method http://stackoverflow.com/questions/2414117/explanation-of-hashmaphashint-method  and ^ is the bitwise exclusive or JLS 15.22.1 Integer Bitwise Operators . As to why this is done the documentation offers.. 
 bitwise not operator  http://stackoverflow.com/questions/2513525/bitwise-not-operator  to represent signed numerical value in bits JLS 15.15.5 Bitwise complement operator ~ note that in all cases ~x equals x 1 .. 
 Change private static final field using Java reflection http://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection 
 Differences in boolean operators: & vs && and | vs || http://stackoverflow.com/questions/4014535/differences-in-boolean-operators-vs-and-vs  AND and bitwise OR operators. int a 6 110 int b 4 100 Bitwise AND int c a b 110 100  100 Bitwise OR int d a b 110 100  110.. int a 6 110 int b 4 100 Bitwise AND int c a b 110 100  100 Bitwise OR int d a b 110 100  110 System.out.println c 4 System.out.println.. 
 How to use Pipe Symbol through exec in Java [duplicate] http://stackoverflow.com/questions/7226538/how-to-use-pipe-symbol-through-exec-in-java  ErrorStream. Later I noticed the Pipe Symbol is used as Bitwise inclusive OR operator in Java. So I used backslash in front.. 
 |