Also found in: Wikipedia.


A bitwise operator treats its operands as a vector of bits rather than a single number. Boolean bitwise operators combine bit N of each operand using a Boolean function (NOT, AND, OR, XOR) to produce bit N of the result.

For example, a bitwise AND operator ("&" in C) would evaluate 13 & 9 as (binary) 1101 & 1001 = 1001 = 9, whereas, the logical AND, (C "&&") would evaluate 13 && 9 as TRUE && TRUE = TRUE = 1.

In some languages, e.g. Acorn's BASIC V, the same operators are used for both bitwise and logical operations. This usually works except when applying NOT to a value x which is neither 0 (false) nor -1 (true), in which case both x and (NOT x) will be non-zero and thus treated as TRUE.

Other operations at the bit level, which are not normally described as "bitwise" include shift and rotate.


Dealing with bits rather than larger structures such as a byte. For example, each of the eight bits in a byte can be used as an individual flag to signal yes/no, on/off (1 or 0) about some condition. The Boolean operators AND, OR and NOT also deal with individual bits rather than bytes.

Bitwise operators are programming commands that work with individual bits. The primary ones are:

Symbol   Function

    <<     Shift left 4 bits
    >>     Shift right 4 bits
    &      AND
    |      OR
    ^      XOR (Exclusive OR)
    ~      NOT (0 to 1; 1 to 0)
References in periodicals archive ?
We are "early" in the Bitcoin futures cycles, which means the launch of Bitcoin ETFs will take time, Hunter Horsley, founder and CEO of Bitwise Asset Management, told a packed conference session on Tuesday in Hollywood, Florida.
where ROR(x,p) performs a circular bitwise right shift on the number x with p times.
AddRoundKey--each byte of the state is combined with the round key using bitwise xor
Multiplication with 2 can be done with bitwise shift operator.
Truth Branding is housed inside of the Bitwise South Stadium building and is currently the only African American-Owned brand design firm in Fresno, CA.
where [direct sum] represents the bitwise x or of binary.
Apply a bitwise and operator between the image obtained in step 4 and the binary image selected by the adaptive thresholding algorithm (Figure 10).
Fresno Pacific University (FPU) will start offering a software engineering major hosted at the South Stadium facility of Bitwise Industries next fall.
iv) x [direct sum] y is the bitwise XOR operation of two vectors x and y; that is, (x [direct sum] y)[i] = x[i] [direct sum] y[i], for all i.
Two types of duplication are considered: bitwise and near duplication.
The parallel fault simulation takes advantage of multi-bit representation of data and availability of bitwise operations [8].
Check for bitwise convergence (which occurs when all strings differ by 5% or less).