Skip to content

English to logic translation exercises with answers

Ten sentences to translate into one formula each: rules with “unless”, “only if”, “neither … nor”, “if and only if”, “not both”, exclusive choices, and necessary and sufficient conditions. Choose the connective, name the inputs, and compare with the formula and truth table under each problem.

Four connectives cause most slips. “Unless” in a rule means “and not”: members may enter unless banned is member AND NOT banned, not an implication. “Only if” points the arrow at the condition: you may board only if you have a ticket is board -> ticket, the ticket is necessary, not sufficient. “Neither A nor B” is NOT A AND NOT B, which De Morgan also writes as NOT (A OR B). “Either … or” is often exclusive in speech, XOR, while a bare “or” in a rule is inclusive.

Input names are part of the answer: use one name per proposition, in snake_case, and write the formula so that the truth table reads like the sentence. The expression under each problem is the translation; its table is the check, so read the rows that should fail the rule and make sure they do. The simplifier may rewrite a translation into a shorter equivalent, as it does for the neither-nor sentence; the two forms are the same function.

1. Translate: “Members may enter unless they are banned.” Inputs member, banned.

member AND NOT banned

#memberbannedf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

member AND NOT banned

Classification: contingent

member AND NOT banned. In a rule, “unless” removes the exception from the permission: entry requires membership and the absence of a ban. The only TRUE row is member = TRUE, banned = FALSE.

2. Translate: “You may board only if you have a ticket.” Inputs board, ticket.

board -> ticket

#boardticketf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

board -> ticket

Classification: contingent

board -> ticket: “only if” makes the ticket a necessary condition, so boarding without a ticket (board = TRUE, ticket = FALSE) is the one row the rule forbids. A ticket alone does not force boarding.

3. Translate: “Neither rain nor snow is forecast.” Inputs rain, snow.

NOT rain AND NOT snow

#rainsnowf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUEFALSE
NOT rain AND NOT snow
  1. De Morgan's law · NOT A AND NOT B = NOT (A OR B)
    NOT rain AND NOT snow → NOT (rain OR snow)Result: NOT (rain OR snow)
NOT (rain OR snow) · verified equivalent on every row · simplified, not minimal

Classification: contingent

NOT rain AND NOT snow: both are ruled out, TRUE only on rain = FALSE, snow = FALSE. The simplifier rewrites it by De Morgan as NOT (rain OR snow), the same function in fewer symbols.

4. Translate: “Shipping is free for orders over 50 or for Prime members, but never for oversized items.” Inputs over_50, prime, oversized.

(over_50 OR prime) AND NOT oversized

#over_50primeoversizedf
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSETRUE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUEFALSE
6TRUETRUEFALSETRUE
7TRUETRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

(over_50 OR prime) AND NOT oversized

Classification: contingent

(over_50 OR prime) AND NOT oversized: an inclusive OR for the two ways to qualify, and “but never” as an AND NOT that overrides both. The table is TRUE on three rows, each with oversized = FALSE.

5. Translate: “The alarm sounds if the system is armed and a door or a window opens.” Inputs armed, door, window.

armed AND (door OR window)

#armeddoorwindowf
0FALSEFALSEFALSEFALSE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSEFALSE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

armed AND (door OR window)

Classification: contingent

armed AND (door OR window). The parentheses matter: without them, armed AND door OR window would sound the alarm for a window even when disarmed, because AND binds tighter than OR.

6. Translate: “Exactly one of the two switches is on.” Inputs switch_a, switch_b.

switch_a XOR switch_b

#switch_aswitch_bf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

switch_a XOR switch_b

Classification: contingent

switch_a XOR switch_b: TRUE when the switches differ and FALSE when both are on or both off. An inclusive OR would wrongly accept both on.

7. Translate: “Access is granted if and only if the user is an admin or has an invitation.” Inputs access, admin, invited.

access <-> (admin OR invited)

#accessadmininvitedf
0FALSEFALSEFALSETRUE
1FALSEFALSETRUEFALSE
2FALSETRUEFALSEFALSE
3FALSETRUETRUEFALSE
4TRUEFALSEFALSEFALSE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

access <-> admin OR invited

Classification: contingent

access <-> (admin OR invited): “if and only if” is the biconditional, so access is granted in exactly those cases and refused in all others. With a plain “if” the formula would be (admin OR invited) -> access, which says nothing about the other rows.

8. Translate: “The pump and the valve are never both on.” Inputs pump, valve.

NOT (pump AND valve)

#pumpvalvef
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

NOT (pump AND valve)

Classification: contingent

NOT (pump AND valve), a NAND: FALSE only on pump = TRUE, valve = TRUE. It is not NOT pump AND NOT valve, which would forbid either one alone.

9. Translate: “A defective item is a sufficient condition for a refund.” Inputs defective, refund.

defective -> refund

#defectiverefundf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

defective -> refund

Classification: contingent

defective -> refund: sufficient means the condition guarantees the outcome, so the arrow starts at the condition. A refund for other reasons (defective = FALSE, refund = TRUE) does not break the rule.

10. Translate: “Passing the exam is a necessary condition for graduating.” Inputs graduate, pass_exam.

graduate -> pass_exam

#graduatepass_examf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.

graduate -> pass_exam

Classification: contingent

graduate -> pass_exam: necessary means the outcome cannot happen without the condition, so the arrow points at the condition. Passing without graduating is allowed; graduating without passing (graduate = TRUE, pass_exam = FALSE) is the one forbidden row.

Questions

Is “A is sufficient for B” the same as “A is necessary for B”?

No: sufficient is A -> B and necessary is B -> A. A defective item is sufficient for a refund, defective -> refund; passing the exam is necessary for graduating, graduate -> pass_exam. Swapping them is the converse slip, and the two formulas differ on one row.

Related

Pitfalls

See also

Practice

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.