# &band(4)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

&band, &bor, &bnot, &bxor - Bitwise macro operators

## SYNOPSIS

&band num1 num2
&bor num1 num2
&bxor num1 num2
&bnot num

## DESCRIPTION

The bitwise operators perform bit operations on numeric values returning a numerical result of the operation.

The functions may all be abbreviated to their three letter abbreviation (i.e. &band may be expressed as &ban). In all cases the first argument is completely evaluated before the second argument.

&band num1 num2

Bitwise AND of num1 and num2 i.e. num1 & num2.

&bor num1 num2

Bitwise (inclusive) OR of num1 and num2 i.e. num1 | num2.

&bxor num1 num2

Bitwise (exclusive OR) XOR of num1 and num2 i.e. num1 ^ num2.

&not num

Bitwise NOT operator of num, inverts the state of all bits i.e. ~num.

Evaluation of the bitwise operators are left to right, the leftmost argument is fully evaluated before the next argument. The operator ordering is prefix notation (see &add(4) for an example of prefix ordering).

## SEE ALSO

Variable Functions, &add(4), &and(4), &negate(4), &or(4).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>