# Grammar question:  A and not B is OR A and not B are?

**URL:** <https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824>\
**Category:** Factual Questions\
**Created:** [August 8, 2012, 4:02am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824 "2012-08-08T04:02:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [August 8, 2012, 11:34am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/21 "2012-08-08T11:34:29Z")

</div>

> [@Floater](#):
>
> I have come across this in a COBOL programme code: “IF NOT (NOT A AND NOT B)”. It took me a while to work out what it meant.

That’s just:  
IF ( A OR B )  
ain’t it?

[sub]saith De Morgan[/sub]

---

<div class="post-metadata">

**Author:** ![Floater](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@Floater](https://boards.straightdope.com/u/Floater)\
**Post date:** [August 8, 2012, 11:48am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/22 "2012-08-08T11:48:29Z")

</div>

> [@Senegoid](#):
>
> That’s just:  
> IF ( A OR B )  
> ain’t it?
> 
> [sub]saith De Morgan[/sub]

Yes, it is and to this day I wonder why the person who had written the code chose to write it the way he did.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [August 8, 2012, 12:52pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/23 "2012-08-08T12:52:27Z")

</div>

> [@Floater](#):
>
> Yes, it is and to this day I wonder why the person who had written the code chose to write it the way he did.

My guess? He originally wrote !A and !B, realized he was getting the opposite result as intended and wrote !(!A and !B), without realizing that’s really just A or B.

---

<div class="post-metadata">

**Author:** ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)\
**Post date:** [August 8, 2012, 4:38pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/24 "2012-08-08T16:38:35Z")

</div>

> [@Floater](#):
>
> Yes, it is and to this day I wonder why the person who had written the code chose to write it the way he did.

I assume the OR’s not exclusive?

---

<div class="post-metadata">

**Author:** ![dstarfire](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dstarfire/32/5762_2.png) [@dstarfire](https://boards.straightdope.com/u/dstarfire)\
**Post date:** [August 8, 2012, 6:07pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/25 "2012-08-08T18:07:30Z")

</div>

Nemo hit this one right on the head.

“The ball and not the box” is most commonly used when there’s an expectation that the ball and the box are the same (usually because somebody has mistakenly stated so).

Otherwise, “the ball but not the box” would be used where there’s no prior expectation.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 8, 2012, 6:49pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/26 "2012-08-08T18:49:12Z")

</div>

> [@Little\_Nemo](#):
>
> I assume the OR’s not exclusive?

In programming, one typically has both inclusive and exclusive OR operators, but it’s the inclusive one that’s usually called “OR”, and the exclusive one is instead called “XOR”.

The De Morgan dual of “AND”, incidentally, is inclusive OR; that is, NOT((NOT A) AND (NOT B)) does indeed translate to A OR B with inclusive OR. The De Morgan dual of XOR is the negation of XOR, sometimes called XNOR.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [August 8, 2012, 7:38pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/27 "2012-08-08T19:38:18Z")

</div>

> [@Little\_Nemo](#):
>
> I’ve always disagreed with this argument. If a sentence seems confusing, then learn what the rules are and construct it correctly. Avoiding a sentence because you’re not sure how to construct it properly is mental laziness.

While I agree that actually knowing the rules is valuable, this does serve as a helpful rule of thumb. If you are having to use esoteric grammar rules, you are likely using a rather esoteric construction. It is likely that said construction will thus be perceived as awkward, whether this is because it is uncommon, or if it is uncommon because it is awkward.

While the best case would be to learn the rule, then decide on stylistic concerns, it isn’t really lazy if the need for the esoteric rule alerts you to the awkwardness of your statement.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [August 9, 2012, 12:44am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/28 "2012-08-09T00:44:59Z")

</div>

> [@Floater](#):
>
> Yes, it is and to this day I wonder why the person who had written the code chose to write it the way he did.

Was there other convoluted code in the program? Could the code have been generated by some kind of automated code generator?

I’m thinking of Ratfor, which took an enhanced version of Fortran source code as its input (which Fortran compilers of the day could not compile), and translated it into proper Fortran that could be compiled. It produced lots of silly stuff like this.

For example, the source construct:  
IF ( some condition) THEN  
stuff stuff stuff  
ENDIF

got translated to:  
IF ( .NOT. (some condition) ) GOTO 500  
stuff stuff stuff  
500 CONTINUE

If you had complicated conditional expressions, it could get real weird.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [August 9, 2012, 12:51am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/29 "2012-08-09T00:51:50Z")

</div>

> [@Indistinguishable](#):
>
> In programming, one typically has both inclusive and exclusive OR operators, but it’s the inclusive one that’s usually called “OR”, and the exclusive one is instead called “XOR”.
> 
> The De Morgan dual of “AND”, incidentally, is inclusive OR; that is, NOT((NOT A) AND (NOT B)) does indeed translate to A OR B with inclusive OR. **The De Morgan dual of XOR is the negation of XOR, sometimes called XNOR.**

The negation of XOR is commonly called EQV. Is XNOR just the same as that?

“OR” and “AND” may not have the same meanings in “plain english” as they do in logic and programming. In particular, OR in everyday usage is often understood to mean exclusive or, as in:  
“I will go to the movie or I will go to the opera.” – That seems to mean: will go to either the movie or the opera (but not both). In law, this is the usual meaning. If you mean “A or B or both”, you need to SAY (or write) “A or B or both”.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [August 9, 2012, 1:44am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/30 "2012-08-09T01:44:06Z")

</div>

Yes, XNOR is the same as EQV.

Actually, what I should say is this:

The De Morgan dual of n-ary XOR is the (n + 1)-ary negation of XOR. When n is odd, this is just n-ary XOR itself (which comes out true just in case an odd number of its inputs are true). When n is even, this is the negation of n-ary XOR, sometimes called n-ary XNOR (which comes out true just in case an even number of its inputs are true).

In the particular case where n = 2, we have binary XNOR, which is equivalent to binary EQV. (It comes out true just in case its two inputs are equal).

Also, the assertion is also made that English “OR” by default means “exclusive OR”, but this does not seem supported by the examples typically used.

For example, if you told me “I will go to the movies or I will go to the opera”, and then you happened to go to both, I would not ordinarily consider you to have lied, even if the implicature had been that you would go to only one.

---

<div class="post-metadata">

**Author:** ![Floater](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@Floater](https://boards.straightdope.com/u/Floater)\
**Post date:** [August 9, 2012, 6:29am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/31 "2012-08-09T06:29:56Z")

</div>

> [@Senegoid](#):
>
> Was there other convoluted code in the program? Could the code have been generated by some kind of automated code generator?

I have no idea, but I don’t think so. It seems it was just his style of coding.

---

<div class="post-metadata">

**Author:** ![jtur88](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jtur88](https://boards.straightdope.com/u/jtur88)\
**Post date:** [August 9, 2012, 1:44pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/32 "2012-08-09T13:44:39Z")

</div>

> [@greenslime1951](#):
>
> I see this _all_ the time in my work: a poorly constructed sentence leads to grammatical confusion.
> 
> Since the point of the sentence is that the box is not the same color as the ball, why not say: “The ball is red, but the box is not”? Problem solved.

Because the principle of grammar is that you can say anything you want and still make it grammatically correct. It is never necessary to reword a sentence in order to apply a grammatical rule to it.

Grammar is not the same as Syntax. It is a syntax rule, for example, that you cannot end a sentence with a preposition. That has nothing to do with grammar, and a sentence can be grammatically correct, even if it ends with a preposition. Grammar only requires that persons, genders, tenses, etc, are all consistent throughout the sentence.

Without changing the sentence, the problem is easily solved by using a singular verb when there is a singular subject, which is “the ball”.

---

<div class="post-metadata">

**Author:** ![Floater](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@Floater](https://boards.straightdope.com/u/Floater)\
**Post date:** [August 9, 2012, 2:15pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/33 "2012-08-09T14:15:47Z")

</div>

> [@jtur88](#):
>
> It is a syntax rule, for example, that you cannot end a sentence with a preposition.

That’s a fallacy that many people have problems with.

---

<div class="post-metadata">

**Author:** ![Inner\_Stickler](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inner_stickler/32/318_2.png) [@Inner\_Stickler](https://boards.straightdope.com/u/Inner_Stickler)\
**Post date:** [August 9, 2012, 2:23pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/34 "2012-08-09T14:23:35Z")

</div>

It’s a prescription that didn’t even appear until the 1700s with which to start.

---

<div class="post-metadata">

**Author:** ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)\
**Post date:** [August 9, 2012, 8:18pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/35 "2012-08-09T20:18:25Z")

</div>

> [@Floater](#):
>
> That’s a fallacy that many people have problems with.

A foolish idea that originated from scholars trying to apply the rules of Latin to the English language.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [August 9, 2012, 9:30pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/36 "2012-08-09T21:30:07Z")

</div>

> [@Little\_Nemo](#):
>
> A foolish idea that originated from scholars trying to apply the rules of Latin to the English language.

You’re talking about the rule that you should never use a preposition to end a sentence with, right?

[sub]Hey! I’m legit! I didn’t end use a preposition to end the above sentence with![/sub]

Similarly, the admonition not to ever split an infinitive comes from overly purist English teachers trying to prissily apply Latin grammar. In Latin of course, and other languages derived therefrom, you _can’t_ split an infinitive because it’s all one word! In English, that space in the middle of an infinitive is often the most natural-sounding place to easily stick a modifier!

And, now let’s talk about double negatives. In English, you shouldn’t never use double negatives. I’ll go along so far as to agree it’s usually a lousy idea, producing awkward sentences. But why? My 8th grade teacher gave a reason that I think was just wrong: LOGIC! Two negatives make a positive! Straight from Algebra or something! “You shouldn’t never use a double negative” means you should ALWAYS use a double negative!

Even then, I called baloney. Two negatives can just as well be even MORE negative! (Hey, that’s Algebra too.) A double negative might be used as a more intensive negative. Besides, who ever said language is logical? Double negatives were quite acceptable in the limited French that I learned.

---

<div class="post-metadata">

**Author:** ![guizot](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guizot/32/3636_2.png) [@guizot](https://boards.straightdope.com/u/guizot)\
**Post date:** [August 9, 2012, 9:34pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/37 "2012-08-09T21:34:21Z")

</div>

> [@jtur88](#):
>
> Grammar only requires that persons, genders, tenses, etc, are all consistent throughout the sentence.

Huh? Do you mean that grammar is only about consistency? Which meaning of “grammar” excludes syntax, and where did you find it?

Grammar is fundamentally just a very intricate system of conventions. Logic–something very different from convention—often can’t explain grammar (though it sometimes is helpful for keeping track of some of the conventions of grammar). It’s silly to think that you can come to a definite decision about an ambiguous grammatical point by sheer dint of logic.

This is why, for example, a word like _family_ is singular in the U.S. and plural in Britain. That’s simply a grammatical convention, and can’t be explained, justified or better understood by way of formal logic.

---

<div class="post-metadata">

**Author:** ![Little\_Nemo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/little_nemo/32/3120_2.png) [@Little\_Nemo](https://boards.straightdope.com/u/Little_Nemo)\
**Post date:** [August 9, 2012, 10:56pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/38 "2012-08-09T22:56:58Z")

</div>

> [@Senegoid](#):
>
> And, now let’s talk about double negatives. In English, you shouldn’t never use double negatives. I’ll go along so far as to agree it’s usually a lousy idea, producing awkward sentences. But why? My 8th grade teacher gave a reason that I think was just wrong: LOGIC! Two negatives make a positive! Straight from Algebra or something! “You shouldn’t never use a double negative” means you should ALWAYS use a double negative!
> 
> Even then, I called baloney. Two negatives can just as well be even MORE negative! (Hey, that’s Algebra too.) A double negative might be used as a more intensive negative. Besides, who ever said language is logical? Double negatives were quite acceptable in the limited French that I learned.

Exactly. Double negatives are wrong in English. But they’re normal and acceptable in Spanish.

However, some misguided language purist applying the rules of English to Spanish might foolishly insist that no Spanish speaker use a double negative. It’s certainly possible to construct Spanish sentences without double negatives. But it’s unnecessary and such a rule would prohibit plenty of grammatically correct Spanish sentences.

---

<div class="post-metadata">

**Author:** ![Floater](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@Floater](https://boards.straightdope.com/u/Floater)\
**Post date:** [August 10, 2012, 11:33am UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/39 "2012-08-10T11:33:33Z")

</div>

> [@Little\_Nemo](#):
>
> A foolish idea that originated from scholars trying to apply the rules of Latin to the English language.

The way I see it is that rules like this do not originate from scholars but from people with a limited knowledge who want to set things in an orderly manner to make them fit within their own narrow minds.

Besides, I don’t know Latin, but if I understand correctly word order doesn’t matter, so wouldn’t this rule be erroneous anyway?

> [@Senegoid](#):
>
> Two negatives make a positive!

But two positives do not make a negative.

Yeah, right.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [August 10, 2012, 12:46pm UTC](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824/40 "2012-08-10T12:46:18Z")

</div>

> [@Little\_Nemo](#):
>
> Exactly. Double negatives are wrong in English. But they’re normal and acceptable in Spanish.
> 
> However, some misguided language purist applying the rules of English to Spanish might foolishly insist that no Spanish speaker use a double negative. It’s certainly possible to construct Spanish sentences without double negatives. But it’s unnecessary and such a rule would prohibit plenty of grammatically correct Spanish sentences.

Same thing with Polish (and other Slavic languages). Negative agreement/concord is the norm, so you have sentences that, literally translated, come out to “I never didn’t have nothing” when formal English would have “I never had anything.” (Double/multiple negatives show up routinely in various dialects of English, too.) Language is not math or logic.

[Previous page](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824.md?page=1)

[Next page](https://boards.straightdope.com/t/grammar-question-a-and-not-b-is-or-a-and-not-b-are/630824.md?page=3)
