## Boolean

*Boolean* values are used in Boolean logic, which evaluates whether a given condition is true (1) or false (0). These values are binary. In computers and other electronic devices, Boolean logic is used to determine if a circuit is charged or on (1) or not charged or off (0). Boolean logic can be used for searches. Boolean logic includes the following comparisons: AND, OR, NOT, and XOR, among others.

AND, OR, NOT, and XOR are used to compare two values.

**AND**: If both values 1 and 2 exist in a statement, the statement is TRUE. If only value 1 or value 2 exists in a statement, the statement is FALSE.**OR**: If either value 1 or 2 exists in a statement, the statement is TRUE.**NOT**: If neither value 1 nor 2 exists in a statement, the statement is TRUE. If either or both exist, the statement is FALSE.**XOR**: If either value 1 or value 2 exists in a statement, the statement is true. If both exist, or if neither exists, the statement is FALSE.

Boolean logic is often used in performing searches online and elsewhere. Here are the results of a search of a local library’s book and media holdings:

railroad – 244 titles

steam – 273 titles

railroad AND steam – 2 titles

railroad OR steam – 347 titles

railroad NOT steam – 240 titles

Boolean algebra applies Boolean logic to solve equations, such as the following:

If x=1 AND y=1: x AND y=1

If x=1 OR y=0: x OR y=1

x=0: NOT x=1

Boolean logic can be visualized using Venn diagrams. Figure 3-2 illustrates how a Venn diagram can be used to show the product lines of three major component manufacturers: Intel, AMD, and NVIDIA.

**Figure 3-2** An Example of a Venn Diagram

The Venn diagram in this figure shows that Intel makes SSDs, whereas AMD does not make SSDs. Both Intel and AMD make motherboard chipsets and CPUs. Both AMD and NVIDIA make graphics processors (GPUs). NVIDIA does not make SSDs, chipsets, or CPUs. Intel does not make GPUs.