Tech

Boolean

Definition

A data type with only two possible values, true or false, fundamental to computer logic, conditional statements, and decision-making in programming.

Try the free calculator

Use our JSON Formatter to run the numbers yourself.

Boolean is a data type named after mathematician George Boole that represents one of two values: true or false. In programming, booleans are the foundation of conditional logic, controlling program flow through if/else statements, while loops, and logical operations.

Boolean algebra uses three primary operators: AND (both conditions must be true), OR (at least one condition must be true), and NOT (inverts the value). These operators combine to create complex logical expressions that power everything from search filters to authentication systems.

In many programming languages, other data types can be evaluated as boolean: zero, null, undefined, empty strings, and NaN are typically falsy, while all other values are truthy. Understanding truthy and falsy values is essential for writing concise, bug-free conditional logic.

Related Calculators

Related Terms

Related Articles

Stay Updated

Get notified about new tools, features, and exclusive deals. No spam, ever.