以下表达式将评估什么? I.(B || C)&& (C& a) [英] What will the following expressions evaluate to? I. (B || C) && (C && a)

查看:66
本文介绍了以下表达式将评估什么? I.(B || C)&& (C& a)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下表达式将评估什么?

i。 (B || C)&& (C& A)(1分)

ii。 A&& (C ||(!B& B)(1分)

iii。(!A ||!C)||(C&&!B)(1分)

iv.A&&(!C&&(B ||!B))(1分)

v。!((A || C)&&(B || C))(1分)

vi.Y + 3X< ZX& A& A(2分)

vii。!(3Z + Z / 3 * 6/3 -X == Z3)&&!((B || C)&&(C& A))(2分)

viii。(Y == 4)&&(Z == 9)||(X> Z)(2分)

ix。(Y == Z)&&(X == 6)||(X> Y || A)&&(2Z< Y3

)(2分)

x。(4Y == 42

)&&(Z == 9)||(4(X

2

)> Z

2

)&&(A&&!B)



我尝试过的事情:



我尝试过各种各样的不幸事故,但我还是没能让这些事情发生。请help

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

推荐答案

我们不做你的家庭作业。

HomeWork不会测试你的技能让其他人去做你的工作,它会让你思考并帮助你的老师检查你对所学课程的理解,以及你应用它们时遇到的问题。

你的任何失败都会帮助你的老师发现你的弱点并设定补救措施。

所以,试一试,重读你的课程并开始工作。如果您遇到特定问题,请显示您的代码并解释这个问题,我们可能会提供帮助。



您需要学习布尔代数

布尔代数 - 维基百科 [ ^ ]

布尔代数(结构) - 维基百科 [ ^ ]
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[^]


我们不做你的作业:它是有原因的。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。



亲自尝试,你可能会发现它不是就像你想象的那样困难!

一次拿一个,然后把它们分成几部分。一次解决一个部件,并将它们组合起来得到每个答案。



如果遇到特定问题,请询问相关问题,我们会尽力而为帮助。但是我们不会为你做这一切!
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!


你应该做你的功课。如果您愿意听老师讲课或阅读课程笔记,至少在某些情况下不会那么难......



对于案例(i),你你能分发 B ||吗? C 到等式的其余部分然后你可以简化等式,因为一部分包含在另一部分中。



案例(ii)解决问题非常简单。



案例(iii)有点困难,但你使用像这样的规则!X || !Y 相当于!(X&& Y)几次。或者,您可以绘制真值表,并找到解决方案。

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





案例(iv)有一些简单的简化...



你必须自己做其他运动......所以后来的情况似乎不正确,无论是代码还是数学表达。此外,对于其中一些情况,还需要其他信息......



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...


这篇关于以下表达式将评估什么? I.(B || C)&amp;&amp; (C&amp; a)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆