How the Boolean math tools work

The Boolean math tools interpret the input cell values as Boolean values, where non-zero values are considered true and the value 0 is considered false. The input rasters are tested on a cell-by-cell basis.

There are four tools for performing boolean logical operations: Boolean And, Boolean Or, Boolean XOr and Boolean Not.

Boolean And

If both values are true, the output is 1. If one or both values are false, the output is 0.

Input1 ≠ 0 and Input2 ≠ 0, Output = 1
Input1 ≠ 0 and Input2 = 0, Output = 0
Input1 = 0 and Input2 ≠ 0, Output = 0
Input1 = 0 and Input2 = 0, Output = 0

Boolean Or

If one or both values are true, the output is 1. If both values are false, the output is 0.

Input1 ≠ 0 and Input2 ≠ 0, Output = 1
Input1 ≠ 0 and Input2 = 0, Output = 1
Input1 = 0 and Input2 ≠ 0, Output = 1
Input1 = 0 and Input2 = 0, Output = 0

Boolean XOr

If one value is true and one value is false, the output is 1. If both values are true or both are false, the output is 0.

Input1 ≠ 0 and Input2 ≠ 0, Output = 0
Input1 ≠ 0 and Input2 = 0, Output = 1
Input1 = 0 and Input2 ≠ 0, Output = 1
Input1 = 0 and Input2 = 0, Output = 0

Boolean Not

Unlike the other boolean tools, there is only one input for Boolean Not.

If the value is true, the output is 0 (the complement of true). If the value is false, the output is 1.

Input1 ≠ 0, Output = 0
Input1 ≠ 0, Output = 1

NoteNote:

If any of the input cell values is NoData, the output value is NoData.

Related Topics

11/8/2012