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

Find the area of the shaded region of the circle. Round to the nearest hundredth. 160.78 615.75 547.62 454.97
What is the slope? Help me please I really am stuck on this
can someone help me please​
What expression is equivalent to x-5/(x-5)(x-4)
4x² - 3y, when x= 1/2 and y= -5
Elyse has $18 on a gift card that she can use to rent movies online. The graph at the right shows the amount of money remaining on her gift card ba. sed on the
If Q is half way between 0 and -1 what is Q
Find the value of x for the following system of equations. x + y = 5 x - y = -7 -1 1 -2
How should the front of an enclosed trailer be?
What is vermin composting​