1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ivann1987 [24]
3 years ago
7

Under which of the following conditions will evaluating this boolean expression

Computers and Technology
1 answer:
zzz [600]3 years ago
3 0
1.) 
<span>((i <= n) && (a[i] == 0)) || (((i >= n) && (a[i-1] == 0))) </span>

<span>The expression will be true IF the first part is true, or if the first part is false and the second part is true. This is because || uses "short circuit" evaluation. If the first term is true, then the second term is *never even evaluated*. </span>

<span>For || the expression is true if *either* part is true, and for && the expression is true only if *both* parts are true. </span>

<span>a.) (i <= n) || (i >= n) </span>

<span>This means that either, or both, of these terms is true. This isn't sufficient to make the original term true. </span>

<span>b.) (a[i] == 0) && (a[i-1] == 0) </span>

<span>This means that both of these terms are true. We substitute. </span>

<span>((i <= n) && true) || (((i >= n) && true)) </span>

<span>Remember that && is true only if both parts are true. So if you have x && true, then the truth depends entirely on x. Thus x && true is the same as just x. The above predicate reduces to: </span>

<span>(i <= n) || (i >= n) </span>

<span>This is clearly always true. </span>
You might be interested in
A microsoft windows os component responsible for representing graphical objects and transmitting them to output devices such as
vaieri [72.5K]
A driver. A driver is basicly and application or component that helps communicate between you computer and a device(a mouse, keyboard, printer etc.) You may have know when you get a new mouse and connect it up, Windows always tries to find a driver and download it. 
5 0
3 years ago
6 The part of the computer that contains the brain or central processing unit is also known as the ?
Olin [163]
Answer:  "CPU" .
________________________________
4 0
3 years ago
write an assembly program that uses the output compare function of a timer to toggle an led every second
victus00 [196]

Answer:

...

Explanation:

8 0
2 years ago
Some of y'all make me lose braincells with your questions
boyakko [2]

Answer:

ok done we will try

BTW have a nice day enjoy your day Stay blessed stay happy stay strong

5 0
2 years ago
Read 2 more answers
Any cute boy wants to talk with me?
andrew-mc [135]

Answer:

no

Explanation:

no

5 0
2 years ago
Read 2 more answers
Other questions:
  • Which answer best describes an unsubsidized federal loan
    9·1 answer
  • What category of predefined formulas in Excel contains the Boolean functions?
    14·1 answer
  • Describe the difference between the while loop and the do-while loop.
    7·1 answer
  • HELP ASAP!!!
    7·1 answer
  • What is the by stander effect
    9·1 answer
  • In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in
    9·1 answer
  • George works for a print newspaper in which of these areas would you be interested to hire new recruits for the newspaper WHICH
    11·1 answer
  • Spreadsheets are sometimes credited with legitimizing the personal computer as a business tool. Why do you think they had such a
    13·1 answer
  • Mack signs into his laptop and gets a message saying all his files have been encrypted and will only be released if he sends mon
    5·1 answer
  • A company is looking for an employee to design and test connections in its
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!