Results 1 to 5 of 5

Math Help - Logical promblem with "or" and "Not" operator

  1. #1
    Newbie
    Joined
    Dec 2010
    Posts
    4

    Logical promblem with "or" and "Not" operator

    I have gotten into a problem in a application the search uses logical operators "or" and "not" now when i have the following search "1 'or' 1 'not' 1" the result always comes up with 1 but there are two ways to simplify the equation the first one is "1 'or' (1 'not' 1)" this would end up with 1 as the answer, the second one is "(1 'or' 1) 'not' 1" this gives me an answer 0. In reality when this logic is used the second one is more suitable than the first one. Please let me know if i am wrong or the applications precedence is wrong


    PS: please let me know the precedence for logical operator.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,513
    Thanks
    769
    The connective 'not' is unary, not binary, so "1 'or' (1 'not' 1)" does not look right. Perhaps what is meant is 'and not'.

    Though this has to be always double-checked, usually 'and' (an analog of multiplication) binds tighter than 'or' (an analog of addition), and unary 'not' binds tighter than both of them. So "1 'or' 1 'and not' 1" would be interpreted as "1 'or' (1 'and not' 1)".
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2010
    Posts
    4
    Thanks for the quick reply so the 'not' has a higher precedence than 'and'/'or. The precedence go like 'not>and>or' please correct me if i'm wrong.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,513
    Thanks
    769
    The precedence go like 'not>and>or'
    In most, if not all, places that I've seen, yes.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Dec 2010
    Posts
    4
    Thanks for your help.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 3
    Last Post: October 17th 2011, 02:50 PM
  2. Replies: 2
    Last Post: June 4th 2011, 12:11 PM
  3. Replies: 2
    Last Post: April 24th 2011, 07:01 AM
  4. Replies: 1
    Last Post: October 25th 2010, 04:45 AM
  5. Replies: 1
    Last Post: June 4th 2010, 10:26 PM

Search Tags


/mathhelpforum @mathhelpforum