menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
Is the expression a || b the same as a && !b
asked
Oct 11, 2018
189k
views
5
votes
Is the expression a || b the same as a && !b
Computers and Technology
high-school
Ikesha
asked
by
Ikesha
8.0k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
2
votes
You could test it
case (1)
a =true, b=false
true || false = true
true && !false = true
PASSED!
a=false b= true
false || true = true
false && !true = false
FAILED!
also try a=true, b =true
so the it is not the same
Jovanka
answered
Oct 14, 2018
by
Jovanka
8.6k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
4
votes
Most definitely not!
A || B is A OR B, if A is true OR B is true, the statement will be true. A && !B is A AND !B, only if A is true AND B is false will the statement be true. With OR, B can be true and the statement will pass.
Joe Bowbeer
answered
Oct 17, 2018
by
Joe Bowbeer
7.3k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
8.6m
questions
11.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org