Is this the right way...
Is this the right way to solve Boolean operators?
Problem: !(1 || 0)
(1 || 0) solve first cuz its in parenthesis. (right??)
(1 || 0) = True
!(TRUE) = False
Final Answer: False
------------------------
Problem: !(1 || 1 && 0)
(1 && 0) solve first cuz AND operator is evaluated before OR
(1 && 0) = False
(1 || FALSE) = True
!(TRUE) = False
Final Answer: False
------------------------
Problem: !((1 || 0) && 0)
(1 || 0) solve first cuz its in a parenthesis inside of parenthesis
(1 || 0) = True
(TRUE && 0) = False
!(FALSE) = True
Final Answer: True
------------------------
Is this the correct way? (i know the answers are right, but is that the correct procedure in solving them? [and the TRUE''s are 1''s and FALSE''s are 0''s?] )
Add any other info u wish, on this topic.
Thank You fellow newbies or wise programmers. :D
Looks correct to me.
You are not the one beautiful and unique snowflake who, unlike the rest of us, doesn't have to go through the tedious and difficult process of science in order to establish the truth. You're as foolable as anyone else. And since you have taken no precautions to avoid fooling yourself, the self-evident fact that countless millions of humans before you have also fooled themselves leads me to the parsimonious belief that you have too.--Daniel Rutter
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement