liveBook · Manning

Boolean

A Boolean is a logical type or value representing truth or falsity, conventionally with two states: true and false.

How 11 Manning books explain it

100 C++ Mistakes and How to Avoid Them

A Boolean value represents one of two logical states, conventionally false and true.

How it is used
Uses Boolean values to represent state, control conditions, and predicate results while preventing integer operations from hiding intent.
How deep it goes
Explains integer and enumeration substitutes, compiler-level bool representation, misuse risks, and direct predicate returns, but avoids deeper implementation details.
Examples
Demonstrates macro-defined truth values, integer and enumeration simulations, bool misuse, toggling, and an isEven predicate.
What you can do after
Apply bool declarations, explicit negation, and direct predicate returns to produce clearer and safer C++ code.

Read how 100 C++ Mistakes and How to Avoid Them explains boolean →

The Well-Grounded Rubyist, Fourth Edition

A truth value is the Boolean interpretation Ruby assigns to an object when it is used as a condition.

How it is used
Uses truth values to decide whether conditional code runs, including when a method reports ticket availability.
How deep it goes
Distinguishes an expression’s resulting object from its truth value through worked conditional tests and a comparison table.
Examples
Tests ticket availability, zero, empty strings, class and method definitions, comparisons, and `puts` return values.
What you can do after
Evaluate/understand why a Ruby condition passes or fails without mistaking a truth value for the object `true`.

Read how The Well-Grounded Rubyist, Fourth Edition explains boolean →

The Quick Python Book, Fourth Edition

A boolean value is a truth-valued value that is either true or false.

How it is used
Supplies truth-valued tests for Python conditionals and loops, including tests of ordinary objects.
How deep it goes
Explains truth rules and operators through small examples, including operand-returning short-circuit behavior; defers detailed precedence rules to Python documentation.
Examples
Uses empty containers, a chained range test, boolean arithmetic, and list-valued `and` and `or` expressions.
What you can do after
Evaluate/understand it by predicting conditional truth values and recognizing when `and` or `or` returns an operand.

Read how The Quick Python Book, Fourth Edition explains boolean →

API Design Patterns

A boolean is a primitive data type whose value is one of two logical states, typically true or false.

How it is used
Uses booleans for flags and simple yes-or-no resource properties such as archiving, chatbot access, and soft deletion.
How deep it goes
Explains representation, naming, missing-value semantics, output-only behavior, and when state fields should replace boolean flags.
Examples
Uses ChatRoom fields for archiving and chatbot access, plus an output-only deleted field for soft deletion.
What you can do after
Apply it via resource APIs by choosing positive flag names, modeling evolving categories explicitly, and enforcing output-only transitions.

Read how API Design Patterns explains boolean →

Tiny Python Projects: Learn coding and testing with puzzles and games

A Boolean value is one of the two truth values, True or False, used to represent logical conditions.

How it is used
Uses truth values to test strings, enforce game rules, and represent program state.
How deep it goes
Explains comparisons, membership, case normalization, and combining conditions, but does not descend into Boolean implementation internals.
Examples
Demonstrates vowel detection, uppercase normalization, comparison output, and Tic-Tac-Toe winner checks.
What you can do after
Apply it via Python comparisons, membership tests, and logical operators to evaluate conditions in small programs.

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains boolean →

Modern C, Third Edition

bool is a C type whose values represent logical truth and falsity.

How it is used
Uses bool to store truth values and conditional expressions to control execution.
How deep it goes
Defines bool values and representation constraints, but defers broader type details to the Boolean data type treatment.
Examples
Demonstrates direct bool conditions, nonzero numerical conditions, and a loop that skips index zero.
What you can do after
Apply bool directly in conditions and avoid redundant comparisons while preserving valid Boolean representations.

Read how Modern C, Third Edition explains boolean →

Acing the CCNA Exam: Volume 2 Advanced Networking and Security

A JSON Boolean is a primitive data type with one of two values, true or false.

How it is used
Represents binary state in JSON data exchanged between applications and commonly supported by REST APIs.
How deep it goes
Defines two values, lowercase syntax, and quoted-value distinctions, without descending into implementation internals.
Examples
Uses interface status, device configuration, quoted "true", and invalid uppercase TRUE to distinguish Boolean syntax.
What you can do after
Evaluate JSON values and identify Boolean syntax errors in configuration data and exam-style examples.

Read how Acing the CCNA Exam: Volume 2 Advanced Networking and Security explains boolean →

Python How-To

A boolean value is a truth value representing one of two logical states, true or false, in Python.

How it is used
Uses truth values to validate strings, filter iterables, test collection overlap, and represent state in JSON data.
How deep it goes
Defines True and False and demonstrates predicates, truthiness, filtering, and short-circuit evaluation without descending into implementation internals.
Examples
Demonstrates username validation, numeric-string checks, stock-list overlap, urgent-task filtering, and JSON Boolean values.
What you can do after
Apply it via predicates, `bool`, set operations, and `filter` to validate data, detect matches, and select items.

Read how Python How-To explains boolean →

Essential TypeScript 5, Third Edition

The boolean type is the JavaScript and TypeScript type whose values are true or false.

How it is used
Uses booleans to represent binary decisions, inspect runtime values, control fallbacks, and describe asserted types.
How deep it goes
Explains definition, inference, coercion, fallback operators, and assertion limits, but stops short of deeper boolean implementation details.
Examples
Demonstrates typeof output, price comparison, fallback tax rates, nullish coalescing, and an unsafe calculateTax assertion.
What you can do after
Apply via JavaScript operators and TypeScript assertions while recognizing when runtime values do not match declared boolean types.

Read how Essential TypeScript 5, Third Edition explains boolean →

Modern C

bool is the C standard boolean type whose values represent false or true.

How it is used
Controls conditional execution and stores values explicitly intended to represent truth.
How deep it goes
Defines truth rules, header names, representations, and assignment behavior without developing deeper implementation details.
Examples
Uses if (i), equality comparisons, and bool b conditions to contrast direct truth testing with redundant comparisons.
What you can do after
Apply Boolean values through stdbool.h and write clearer conditions without redundant truth comparisons.

Read how Modern C explains boolean →

Building User-Friendly DSLs

A value or type with one of two truth values, true or false.

How it is used
Uses boolean values to validate conditions in business rules within a domain-specific language.
How deep it goes
Defines the type, registers it, and type-checks rule conditions, but does not implement logical-expression evaluation.
Examples
Uses a built-in boolean type and a business-rule condition checked against that type.
What you can do after
Build it from scratch by adding boolean type registration and validating business-rule conditions against it.

Read how Building User-Friendly DSLs explains boolean →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.