Available with Image Analyst license.
Available with Spatial Analyst license.
Overview
Performs a Bitwise Or operation on the binary values of two input rasters.
Notes
Two inputs are necessary for this function to execute.
The order of the inputs is irrelevant for this function.
If an input is floating-point data type, the values are converted to integer values through truncation before the bitwise operation is performed.
All bitwise operations have the following in common:
- Binary values are stored in two's complement.
- The tools work on 32-bit integers.
- The leftmost bit position is reversed for the sign (positive or negative) of the value. If the integer is positive, the bit position is 0; if it's negative, the bit position is 1.
The Bitwise Or operation treats the sign bit as it would any other bit. If one or both inputs for a pixel location are negative, the output is negative; if both inputs are positive, the output is positive.
If both inputs are single band rasters, or one of the inputs is a constant, the output will be a single band raster.
If both inputs are multiband rasters, or one of the inputs is a constant, the output will be a multiband raster. The number of bands in each multiband input must be the same.
The function will perform the operation on each band from one input against the corresponding band from the other input. If one of the inputs is a multiband raster and the other input is a constant, the function will perform the operation against the constant value for each band in the multiband input.
Parameters
Parameter name | Description |
---|---|
Raster | The first input to use in this bitwise operation. A constant value can be used as an input for this parameter, provided a raster is specified for the other parameter. |
Raster2 | The second input to use in this bitwise operation. A constant value can be used as an input for this parameter, provided a raster is specified for the other parameter. |
Extent Type | Choose which extent should be used in the output raster:
|
Cellsize Type | Choose which cell size to use in the output raster. If all the input cell sizes are the same, all the options will yield the same results.
|
Learn more about bitwise
The bitwise tools evaluate the binary representation of the input values on a pixel-by-pixel basis. For each bit in the binary representation, a Boolean operation is performed.
The logic of how the various bitwise tools operate is illustrated in the following sections. The arrows are used to indicate the flow of operation of how input values are converted to a base2 binary representation, analyzed, and returned as a decimal (base10) value.
Learn more about how Bitwise Or works
For Bitwise Or, for each bit where one or both inputs are 1, the output is 1. If both bits are 0, the output is 0 for the bit.