What does bool mean?
A bool is a fundamental data type in computer programming that can take exactly one of two values: true or false. The word is an abbreviation of "Boolean," honoring George Boole, the nineteenth-century English mathematician who developed the algebra of logic on which all modern digital computation rests. Booleans are ubiquitous in code: every conditional statement, loop condition, and comparison ultimately evaluates to a bool, and functions frequently return one as a compact yes-or-no answer. Programmers declare variables as bools to make their intent explicit and to let the language enforce two-state logic, preventing stray values from creeping in. Though spelled identically across many languages — lowercase in C++, Rust, and Swift, capitalized as "Boolean" elsewhere — the concept is universal. While essentially confined to technical registers, the bool is among the most consequential words in modern life, quietly governing the decision points inside nearly every piece of software ever written.
nounIn programming, a value or variable that can hold one of two states, true or false; short for "Boolean."
- A data type (or a value of that type) in programming languages that can be either true or false.
"The function returns a bool indicating whether the login succeeded."
"Declare it as a bool so the compiler knows it can only be true or false."
"The API returns a bool rather than a string, making the response easy to check."
Pluralizes regularly when referring to multiple boolean values or variables.
"The struct stores three bools representing the user's notification preferences."
Every if-statement you've ever written traces back to George Boole, a self-taught 19th-century English mathematician whose wife reportedly said he could barely tie his own cravat.
Reviewed by Deb Chak, Editor. AI-assisted content curated by RJS Tech Solutions LLP.
Etymology of bool
The word "bool" derives from "Boolean," itself formed from the surname of George Boole (1815–1864), the largely self-taught English mathematician whose 1854 work "An Investigation of the Laws of Thought" founded symbolic logic. When early programming languages needed a name for a true/false data type, they adopted Boole's eponymous adjective, later shortened to the keyword "bool." It is thus a modern coinage with no classical root and no true cognates beyond other terms derived from Boole's name.
Related word forms
How bool is actually used
Strictly a term of art in computer science and software development; rarely encountered outside technical contexts. Spelled with a lowercase b in most programming languages such as C++ and Rust (as "bool") and C# (as an alias of System.Boolean). In everyday prose, the fuller adjective "Boolean" is more common.
Easily confused with bool
"Bowl" is a round container or the act of playing bowls, while "bool" is a two-valued data type in computing.
"Boole" is the surname of mathematician George Boole, after whom the bool data type is named; "bool" is the keyword used for his true/false logic.