jasperzhouzihe2138 jasperzhouzihe2138
  • 03-02-2018
  • Mathematics
contestada

Assigned newbits with the opposite values of oldbits if flipbits is true. ex: if oldbits = [1, 1, 0, 1] and flipbits is 1, then newbits = [0, 0, 1, 0]

Respuesta :

kaliyahbenning2
kaliyahbenning2 kaliyahbenning2
  • 05-02-2018

Franck's answer is better (using ~), but I just wanted to point out that the conditional in yours is slightly redundant. It's easy to forget that, since you already have a boolean value, you don't need to perform a comparison in your conditional. So you could have just done this...

if x x = false; else x = true; end
Answer Link

Otras preguntas

Which of the following decreases in labor demand is due to a change in product demand? rev: 06_21_2018 Multiple Choice An increase in the price of paper increas
Which number is rational? square root 2 3.4 square root 10 square root 16
what is the degree of the monomial -7y^4z
A balanced chemical equation is shown belowC6H1206 +602-6H20 + 6CO2Which of the following best describes the number of atoms for each element in the chemical eq
Is 4, 7, and 8 a Pythagorean triple?
what does it mean “smiling blue eyes as bright as a summer sky held”
Solve for p. 7 - p = 4 p= wwwwww Submit Not feeling ready yet? This can helpt
are coyotes endangered animals?? someone please help me (even though it's late...)
Fact or opinion: A vassal is a knight who promised to support a lord in exchange for land
- A restrictive policy is very A- detailed B- liberal C- old fashion D- limiting