Skip to content

Is 1 true or false? 1 = TRUE, 0 = FALSE in Boolean logic

In Boolean logic, 1 means TRUE and 0 means FALSE: they are the only two values, written TRUE and FALSE in the words and programming notations and 1 and 0 in the mathematical and algebra notations. A constant in a formula either disappears or decides the result, and the laws of identity and domination say which.

The first table below shows A AND TRUE, whose column is simply A: TRUE is the neutral element of AND, as FALSE is of OR (A OR FALSE is A). The second shows A OR TRUE, which is TRUE on both rows: TRUE dominates OR, as FALSE dominates AND (A AND FALSE is FALSE). The simplifier applies these two laws whenever a complement law has produced a constant, which is how A AND (B OR NOT B) collapses to A.

The parser accepts TRUE, FALSE, 1 and 0, case-insensitively for the words, and prints the constants to match the notation: words and programming notation print TRUE and FALSE, the mathematical and algebra notations print 1 and 0. The digits are Boolean constants, not integers: there is no arithmetic, 1 AND 1 is 1, and A = 1 is not a formula, because = is not an operator in this language.

A formula made only of constants has no inputs and therefore a truth table with exactly one row, which the semantics specification fixes so that checks and exports agree on the edge case; NOT TRUE is FALSE by the constant-negation law. In code, Python writes True and False, SQL has TRUE, FALSE and the third value NULL, and C treats zero as false and any other number as true, three conventions the languages reference compares.

Accepted spellings

TRUE FALSE 1 0

WordsTRUE / FALSE
ProgrammingTRUE / FALSE
Mathematical1 / 0
Algebra1 / 0

A AND TRUE, A OR FALSE: A AND TRUE

A AND TRUE
#Af
0FALSEFALSE
1TRUETRUE
Beginnerf is true exactly when both A and TRUE are true.
In every other case, f is false.
About the operators:
- AND is true only when all of its parts are true.
- TRUE and FALSE are constants: they do not depend on any input.
Intermediatef is true exactly when both A and TRUE are true.
In every other case, f is false.
Advancedf is true exactly when both A and TRUE are true [conjunction ∧].
In every other case, f is false.
Formal notation: A ∧ 1
A AND TRUE A AND TRUE A f AND TRUE
A AND TRUE A AND TRUE A f AND TRUE

A OR TRUE, A AND FALSE: A OR TRUE

A OR TRUE
#Af
0FALSETRUE
1TRUETRUE
Beginnerf is true exactly when at least one of A or TRUE is true (both may be true).
In every other case, f is false.
About the operators:
- OR is inclusive: it is true when at least one part is true, including when several are.
- TRUE and FALSE are constants: they do not depend on any input.
Intermediatef is true exactly when at least one of A or TRUE is true (both may be true).
In every other case, f is false.
Advancedf is true exactly when at least one of A or TRUE is true (both may be true) [inclusive disjunction ∨].
In every other case, f is false.
Formal notation: A ∨ 1
A OR TRUE A OR TRUE A f OR TRUE
A OR TRUE A OR TRUE A f OR TRUE

The common slip

Writing a constant where a variable was meant, or the reverse. A rule that reads member AND TRUE has a redundant condition, and the simplifier removes it; a rule that reads member AND FALSE can never be true, and the contradiction check says so on every row.

Questions

Is 0 ever TRUE?

Not in Boolean logic: 0 is FALSE and 1 is TRUE. The confusion comes from conventions outside logic. In a Unix shell an exit status of 0 means success, so if takes its first branch when a command returns 0; that is a convention about programs, not a truth value. In C, Python and JavaScript the number 0 counts as false and other numbers such as 1 and -1 count as true, so bool(-1) is True in Python.

Does 1 AND 1 equal 2?

No. 1 is TRUE, 1 AND 1 is TRUE, and there is no addition; the algebra plus sign A + B means OR, so 1 + 1 is 1.

How do I say that A is TRUE?

Just A. A formula is a claim about the rows where it is TRUE, so the formula A holds exactly on the rows where A is TRUE; A = TRUE is rejected by the parser, and A <-> TRUE simplifies to A.

Related

Guides

Laws

Tools

See also

Operators and gates

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.