Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6915213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:26:49+00:00 2026-05-27T09:26:49+00:00

Using boolean algebra (not a specific language implementation), can we evaluate 1 ^ 1

  • 0

Using boolean algebra (not a specific language implementation), can we evaluate 1 ^ 1 + 1 (or 1 XOR 1 OR 1) unambiguously?

I can derive two evaluations:

 [I]:  (1 ^ 1) + 1 = 0 + 1 = 1
[II]:  1 ^ (1 + 1) = 1 ^ 1 = 0

Perhaps there’s some stated order of operations, or of a left-to-right evaluation? Or is this not defined in Boolean algebra?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:26:49+00:00Added an answer on May 27, 2026 at 9:26 am

    We can use the rules of boolean algebra to attempt to evaluate the expression 1 XOR 1 OR 1.

    Now:

    • XOR is derived from OR such that A XOR B = (¬A AND B) OR (¬B AND A);
    • Associativity tells us that A OR (B OR C) = (A OR B) OR C;
    • Associativity also tells us that A AND (B AND C) = (A AND B) AND C

    So, taking either of the possible interpretations of evaluation order:

      (1 XOR 1) OR 1                       1 XOR (1 OR 1)
    

    Even though we have no left-to-right “evaluation order” defined, these rules are all we need to show that the two possible interpretations are not equivalent:

    = (¬1 AND 1) OR (¬1 AND 1) OR 1      = (¬1 AND (1 OR 1)) OR (¬(1 OR 1) AND 1)
    = (0 AND 1) OR (0 AND 1) OR 1        = (0 AND 1) OR (0 AND 1)
    = 0 OR 0 OR 1                        = 0 OR 0
    = 1                                  = 0
    

    Unless I’m forgetting some crucially pertinent axiom, I’ve confirmed that you need more context to evaluate the given expression.

    (And, of course, examining the expression A XOR B OR C ∀A,B,C is of course substantially more tricky! But if the expression is ambiguous for just one value of all three inputs, then why bother checking for any others?)

    This context is usually provided in language-specific evaluation-order rules. C-type languages give XOR a low precedence (something Richie came to dislike); by contrast, mathematical convention dictates a left-to-right associativity where no other axiom can be applied and an ambiguity is otherwise present.

    So, basically, since we’re ignoring language-specific rules, you’d probably go with [I].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I pick/ delete all the documents from Solr using the boolean NOT
Using Flex and Bison, I have a grammar specification for a boolean query language,
If i have something like this, where i can control the auto-scrolling using boolean
Is there a way to combine two or more CSS selectors using a boolean
When using COM boolean values are to be passed as VARIANT_BOOL which is declared
How do I map a CHAR(1) to a boolean using Hibernate for Java?
When I try to make a very large boolean array using Java, such as:
I'm using key value observing on a boolean property an NSObject method: -(void)observeValueForKeyPath:(NSString *)keyPath
When I'm using an If statement and I want to check if a boolean
Hi I am using hibernate and Mysql. I have a class with a boolean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.