Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What will the following expressions evaluate to?
i. (B || C) && (C && A) (1 mark)
ii. A && (C || (!B && B) (1 mark)
iii. (!A || !C) || (C && !B) (1 mark)
iv. A && (!C && (B || !B)) (1 mark)
v. !((A || C) && (B || C)) (1 mark)
vi. Y+3X < Z-X && !A (2 marks)
vii. !(3Z + Z/3 * 6/3 - X == Z3 ) && !( (B || C) && (C && A)) (2 marks)
viii. ( Y==4 ) && ( Z==9 ) || ( X>Z ) (2 marks)
ix. (Y==Z) && ( X==6 ) || ( X > Y || A ) && ( 2Z < Y3
) (2 marks)
x. ( 4Y==42
) && ( Z==9 ) || ( 4(X
2
) > Z
2
) && (A && !B)

What I have tried:

I have tried all sorts of mishaps and i havent been able to get these to work. Please help
Posted
Updated 19-Nov-16 9:56am
Comments
[no name] 19-Nov-16 13:56pm    
We aren't a "do my homework for me" site. If you do not understand your homework, ask your teacher.

We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.

You need to learn Boolean algebra
Boolean algebra - Wikipedia[^]
Boolean algebra (structure) - Wikipedia[^]
 
Share this answer
 
Comments
Member 12859642 19-Nov-16 16:11pm    
oh sorry
Patrice T 19-Nov-16 16:26pm    
No problem.
Give a try to your HomeWork, even if you fail, you will learn something.
Member 12859642 19-Nov-16 16:32pm    
the thing is if i fail this im failing my coursework
Patrice T 19-Nov-16 16:59pm    
The mastering of Boolean Algebra comes with experience.
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
Take them one at a time, and break them down into parts. Solve the parts one at a time, and combine them to get each answer.

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
Comments
Member 12859642 19-Nov-16 15:09pm    
it isnt homework, its an exercise my teacher gave me. im not really good at these kinda stuff so i wanted somebody to help me with them
OriginalGriff 19-Nov-16 16:53pm    
Please, do enlighten me as to what the difference is between "homework" and "an exercise my teacher gave me".
Because that is the definition of "homework"...

And why do you think he "gave you the exercise" if it wasn't because you're "not really good at these kinda stuff" and need to perceive doing it?
You should do your homework. If you would liste to your teacher or read your course note, it would not be that hard at least for some cases...

For case (i), you could you could distribute B || C to the rest of the equation and then you can simplify the equation as one part is included in the other.

Case (ii) is very trivial to solve.

Case (iii) is somewhat more difficult but you use rule like !X || !Y is equivalent to !(X && Y) a few times. Alternatively, you can draw a truth table, and find the solution.
A B C   !A   !C   (...)   C   !B   (...)   result
0 0 0    1    1     1     0    1     1        1
0 0 1    1    0     1     0    1     0        1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1


Case (iv) has some trivial simplification...

You have to do other exercise all by yourself... So later cases seems to be incorrect either as code or mathematical expression. Also, for some of those cases, other information is required...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900