Boolean operators.

Posts 16–29 of 29 · Page 2 of 2
Quote Originally Posted by zhaoyun333 View Post
Errr actually cookies is wrong, everything other than 1 is true. bool n = (36) in this expression n is true

!(1||0) &&0) <--- your missing a bracket....but i suppose it would be here
!((1||0) &&0)
Since the INSIDE brackets are first we evaluate (1||0) which is true
!( 1 && 0 )
both have to be true so this express is now
! (0)
the ! operator flips the bit so it would be
1
o_o How am I wrong? Is it not 1 = True, 0 = False
0 = false, above 0 = true
Quote Originally Posted by Hell_Demon View Post
0 = false, above 0 = true
This is what Hell_Daddy wanted us all to see, children of his.

Quote Originally Posted by Hell_Demon View Post
0 = false, above 0 = true
I was under the impression that was only for converting over datatypes to a Boolean. And that False is equals 0 and true equals 1.
Quote Originally Posted by wtfiwantthatname View Post
I was under the impression that was only for converting over datatypes to a Boolean. And that False is equals 0 and true equals 1.
That's basically what he's saying. 0 = False, and Anything above 0 = True, i.e.

2 = true
69 = true
420 = true
666 = true
12122012=true
0 = false
Hey I found that first :O it was in my sig lol
Hey! Dont forget my other post(that got removed pretty quickly ;P)

lol
"Have fun in your new home"
Im certain that it is

0 is false

!0 is true ( by not zero that includes negative numbers)
Quote Originally Posted by zeco View Post
Im certain that it is

0 is false

!0 is true ( by not zero that includes negative numbers)
someone teached me this too...

including negative numbers..
To be or not to be, to be true, or to be not true, to be false, or to be gay.
Wait what? o_o I somewhat understand this a bit more clearer now.

But I definetly loved zeco's example on MSN last night.

!(0 || 1)
"!(Dead || Alive) = Alive. !(Alive)= Not Alive = Awww shet, he's dead guys. "
Negatives can also be false. Technically, if it's not 0, it's true(ex. -100, 50, -3.50 are all true)
Quote Originally Posted by rwkeith View Post
Negatives can also be false. Technically, if it's not 0, it's true(ex. -100, 50, -3.50 are all true)
Do you mean negatives can also be true? Because otherwise your statement contradicts itself =)
Quote Originally Posted by zeco View Post
Do you mean negatives can also be true? Because otherwise your statement contradicts itself =)
Yea, forgot to chew it over with a twix.
Posts 16–29 of 29 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us