Close

Results 1 to 7 of 7
  1. #1
    DF VIP Member burner1's Avatar
    Join Date
    Apr 2005
    Location
    South West
    Posts
    7,570
    Thanks
    329
    Thanked:        676
    Karma Level
    1214

    Default After some clarification on truth tables

    As part of my uni course, I've got to the point of covering truth tables and slowly going in to Javascripting. I can get hold of the JS pretty quick actually so that's not too bad as of yet (I know it'll get harder lol) but tbh, I'm struggling a bit with truth table outputs... can any of you lads clarify I've grasped this one correctly:

    The difference between:
    NOT (A and B) and NOT A and B

    Is that the first ones output would deem true if 'either' A or B were false (going by the parenthesis first rule), and the second one's output would be only true if 'Both' were false?

    Having trouble even typing an explanation lol.

    tia.
    "An evil exists that threatens every man, woman, and child of this great nation. We must take steps to ensure our domestic security and protect our homeland." - Adolf Hitler, 1933

  2. #2
    DF VIP Member coin-op's Avatar
    Join Date
    Mar 2001
    Location
    About
    Posts
    2,670
    Thanks
    60
    Thanked:        199
    Karma Level
    452

    Default Re: After some clarification on truth tables

    NOT A AND B will be true if A is false and B is true

    ie (NOT A) AND B
    Cheers - Coin-Op


  3. #3
    DF VIP Member nitelife's Avatar
    Join Date
    Nov 2002
    Location
    Reading, Berks
    Posts
    1,170
    Thanks
    115
    Thanked:        13
    Karma Level
    337

    Default Re: After some clarification on truth tables

    coin-op is correct. Its about understanding operator precedence. AND has a lower precedence than NOT which means:

    NOT A AND B

    Is the same as

    (NOT A) AND B

    NOT (A AND B) is obviously different (im assuming you understand that the brackets mean do this part first).

  4. #4
    DF VIP Member OrangeJuicey's Avatar
    Join Date
    Aug 2006
    Location
    London
    Posts
    1,283
    Thanks
    1
    Thanked:        4
    Karma Level
    289

    Default Re: After some clarification on truth tables

    TO B OR NOT TO B

    lol couldn't help myself.

  5. #5
    DF VIP Member burner1's Avatar
    Join Date
    Apr 2005
    Location
    South West
    Posts
    7,570
    Thanks
    329
    Thanked:        676
    Karma Level
    1214

    Default Re: After some clarification on truth tables

    Thanks for the input guys (and the bad joke lol)

    So I'm taking this to equate to this screen shot of tables I've put in my document?:



    Appreciate your help... long time since I done anything more complex than browsing pron sites
    "An evil exists that threatens every man, woman, and child of this great nation. We must take steps to ensure our domestic security and protect our homeland." - Adolf Hitler, 1933

  6. #6
    DF VIP Member nitelife's Avatar
    Join Date
    Nov 2002
    Location
    Reading, Berks
    Posts
    1,170
    Thanks
    115
    Thanked:        13
    Karma Level
    337

    Default Re: After some clarification on truth tables

    Your second table is incorrect. The A AND B column is correct, but the 4th column NOT (A AND B) is incorrect.

    Since you have a column A AND B, NOT (A AND B) is the inverse of that column (you are NOTing it).

    Code:
    A               B               A AND B               NOT (A AND B)
    1               1                    1                          0
    1               0                    0                          1
    0               1                    0                          1
    0               0                    0                          1
    Where 0 is false, and 1 is true.
    Last edited by nitelife; 8th May 2009 at 05:41 PM. Reason: formatting

  7. #7
    DF VIP Member blacksheep's Avatar
    Join Date
    Jun 2006
    Location
    Manchester
    Posts
    3,877
    Thanks
    87
    Thanked:        265
    Karma Level
    546

    Default Re: After some clarification on truth tables

    !(A&&B)=!A||!B
    !A&&!B=!(A||B)

Similar Threads

  1. Restaurant uses naked girls as tables
    By cronus71 in forum The Dog and Duck
    Replies: 16
    Last Post: 7th November 2002, 04:15 PM
  2. truth.org got hacked haha
    By station420 in forum The Dog and Duck
    Replies: 7
    Last Post: 16th October 2002, 05:45 AM
  3. The REAL truth about Gamecube mini DVD's
    By marcux in forum Nintendo Consoles
    Replies: 0
    Last Post: 30th September 2002, 08:32 PM
  4. the truth
    By devastar in forum Microsoft Consoles
    Replies: 1
    Last Post: 29th September 2002, 03:48 PM
  5. why cant i read a gc disc on my pc - THE TRUTH
    By ABCMan in forum Nintendo Consoles
    Replies: 6
    Last Post: 18th September 2002, 01:37 AM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •