!(1 && !(0 || 1))

can u tell me what each part does and what it is?

try make it clear and simple for me please

and wondering on how to evaluate that

Printable View

- 08-13-2003yakabodSomeone explain it please
!(1 && !(0 || 1))

can u tell me what each part does and what it is?

try make it clear and simple for me please

and wondering on how to evaluate that - 08-13-2003jverkoeyRe: Someone explain it pleaseQuote:

!(1 && !(0 || 1))

0 || 1 == 1 because it's testing if either 0 OR 1 are true, and one of them IS :)

then, we have the ! right before that, so that inverts the current value, so that now we have 0

then it tests (1 && 0) and since not BOTH of them aren't 1, then it equals a 0, making it !(0)

so, the end result is 1/true

-edit-

typo..... - 08-13-2003o0obruceleeo0oRe: Someone explain it pleaseQuote:

*Originally posted by yakabod*

**!(1 && !(0 || 1))**

can u tell me what each part does and what it is?

try make it clear and simple for me please

and wondering on how to evaluate that

!(1 && !(1))

The next step is the !(1). This obviously returns 0 (or FALSE). So now we have:

!(1 && 0)

Now, since we know that both have to be TRUE for the && statement to be TRUE, we get this:

!(0)

!0 must be a value other than 0, which means your statement == TRUE

I hope I explained it clearly enough and didn't ramble too much :).

EDIT: Looks like jverkoey beat me to it :) - 08-13-2003yakabodQuote:

The next step is the !(1). This obviously returns 0 (or FALSE). So now we have:

So how does this become false? because ! means NOT right? so making...

!(1) //Not 1 But 0

will that be right?