Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Bitwise Operations

Bitwise operations include NOT, OR, AND and XOR. The first operation does not require an operand, while all others require the operand of a given size. More information is provided in the table below (in the table below x is a variable holding the value being processed):

NameOperandOperation Description
NOTN/Ax = ~x
ORax = x | a
ANDax = x & a
XORax = x ^ a

The size of both operands depends on the view type of the current editor window.

Bitwise Operation Window

When you execute a bitwise operation, the following window appears:

Bitwise Operation Window

The operation you chose is automatically selected, but you can change it if you like.

If selected operation requires an operand, select its type and enter its value.

Using Patterns as Operands

You can use a pattern for a bitwise operation (except for NOT). In this case, the operation iterates through each byte (or word etc., depending on view type) as the operation is applied to the selection.

Alignment

Non-byte size operands are always aligned.

Scripting

Scripts may execute bitwise operations using the IDocumentView.bitwiseOpAsync method.