# I have a newbie question...:/

• 01-09-2010
johnnywolinski
I have a newbie question...:/
Okay, so I've been learning C++. I got to the second page in the tutorials, and can make my computer say stuff. I can even talk back to it. But, then I got to booleans and got stuck. I understand the <, >, ==, all of that stuff, but evaluating gets me completly puzzled.

!( 1 || 0 )

That's what I'm talking about. It says to evaluate it. I understand that ! means NOT and stuff, but how to I get it down to 1 or 0?

Thanks SO much.
• 01-09-2010
King Mir
It's just like regular arithmetic, except with 1 and 0 instead of real numbers.

|| is like addition, && is like multiplication, and not does not have a direct analogue.

So just as you would simplify 7+3*5 to 7+15 and then to 22, so you would simplify !(1||0) to !(1) and then to 0.
• 01-09-2010
johnnywolinski
Quote:

It's just like regular arithmetic, except with 1 and 0 instead of real numbers.

|| is like addition, && is like multiplication, and not does not have a direct analogue.

So just as you would simplify 7+3*5 to 7+15 and then to 22, so you would simplify !(1||0) to !(1) and then to 0.
OH! It makes so much sense now! Thanks :)