Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Boolean Algerbra

Options
  • 26-09-2013 9:55am
    #1
    Registered Users Posts: 4


    Can anyone explain how to work this out?.

    A B A & & b (AND)
    False False False
    False True False
    True False False
    True True True

    Using the above information what is the result of the following statement?

    (2<3) AND (3<4)

    A. True
    B. False


Comments

  • Registered Users Posts: 149 ✭✭Razzen


    Ok you've a truth table for logical AND, which lists all possible combinations of A and B

    The first line of your table could be read as:
    if some condition A is false and some condition B is also false the the result of A && B will also be false.

    so now you are being asked to use the truth table to work out the answer to
    (2<3) AND (3<4)

    So (2<3) would be A in our table and (3<4) would be B

    So is A true or false? is 2<3? yes so A = True
    and is B true of false? is 3<4? yes so B = True

    we can now look at the last line of the truth table to see that when A is true and B is true then A && B is also true.

    The key is understanding that the truth table gives us all possible combinations, and we can then use it to evaluate any equation using AND.

    Hope that helps a little.


  • Registered Users Posts: 4 mickeyraes


    Thanks Razzen, well explained have another one for you:

    A B A B | | (OR)
    False False False
    False True True
    True False True
    True True True

    Using the above information what is the result of the following statement

    (4 = = 5) | |( 2 + 2 = =4)

    a. true
    b.false


  • Registered Users Posts: 149 ✭✭Razzen


    There should be enough info in my first post for you to try answer this one... Give it ago and post up your attempt..i'll help once you've made an attempt at it yourself.


  • Registered Users Posts: 4 mickeyraes


    Would the answer be true. The first one (4==5) is false and the second one (2+2==4) is true


  • Registered Users Posts: 149 ✭✭Razzen


    Yup well done....

    Basically For AND the answer is only ever true if both A AND B are true

    for OR, the answer is true is A OR B is true (if they are both true then that's also good)

    XOR would mean strictly A OR B (but not both)

    Good luck with them.


  • Advertisement
Advertisement