1. We will be in Read Only mode (no new threads, replies, registration) starting at 9:00 EDT for a number of hours as we migrate the forums to upgraded software.

boolean simplifying help

Discussion in 'Homework Help' started by loserbrewer, Feb 8, 2007.

  1. loserbrewer

    Thread Starter New Member

    Feb 8, 2007
    1
    0
    New to this boolean stuff. Can anyone tell me if these look correct. Thanks for helping me learn.


    !(x<5) && !(y >=7)
    !(x<5) && !(y >=7)
    x>5 && y<7


    and also,


    !(a==b) || !(g !=5)
    a!=b || g==5

    Thanks,
    John
     
  2. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    172
    Both are correct.

    Dave
     
  3. alhirzel

    New Member

    Feb 11, 2007
    1
    0
    From above,

    Shouldn't the final result be as follows?

    (Considering the case where x=5.)
     
  4. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    172
    Oops! :confused: Missed that one, indeed you must take account of the condition where x=5 as alhirzel has pointed out.

    Dave
     
Loading...