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

each school year the 7th graders who study life science participate in a special field trip to the zoo in 2010 the school paid 1260$ for 84 students to enter th
What is another name for sweet potatoes that means you talk to much
What is the answer to 4x^2-64
Alzuria is a developing economy. with trade and​ liberalization, the country has now seen substantial development in the private sector.​ however, government in
I need to know number 23, I wasn't in class for the day she taught us this!
find the zeros of quadratic polynomial 3x^-2 and verify the relationship between the zeros and the coefficients
how far will a runner travel at an average speed of 5m/s for 20 minutes?
A researcher collected archaea and protists from a thermal vent. how do the cells of these two organisms differ?
How do you round 431,801 kg to four significant figures
simplify (8^3)^7 = 8^n