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 pair of functions are inverses of each other?  A. f(x) = \sqrt[3]{{6x}}f(x)= 3 6x​ and g(x) = {\left( {\frac{x}{6}} \right)^3}g(x)=( 6 x​ ) 3  B. f(x) =
Daryl biked for 12 minutes and traveled 1.6 miles. If He kept the same pace, how far would he travel in 3.5 hours? please show work if possible!!!!
HELP!! Find the solution of this system of equations x - y = 4 - 10x + y = -58
Is 5/4 a solution to the problem: 3(+9)=4−7+7.
What is the solution to the equation x+7/2=5x/3
i need help with this?
What is the main difference between primary data and secondary data? Provide one example of primary data and one example of secondary data.
Plz tell me the answer
Why would researching the average earnings by major and by career be useful to you as you choose an institute for higher education
someone can answer this? x + y + 2 and x - y - 1​