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

Preterite vs Imperfect breakout room (word search) I need help plz
A car traveling at a speed of 30.0 m/s encounters an emergency and comes to a complete stop in 7.5 seconds? What is the cars acceleration?
How many inches is 2 miles??
Who crossed the Atlantic and arrived on a large island which he named Newfoundland
HURRY PLEASE THANKS On his math test, Balavan wrote that a four-sided polygon that has at least two right angles must be a rectangle or a square. Denna wrote th
What's your name, what's your sign, what's your birthday? What's your wrist tattoo bible verse say? Tell me this, do you kiss on the first date? Don't hold anyt
what does each egyptian symbols mean
28. The moment the reader knows who will win the conflict. The point of no return. exposition rising action climax falling action resolution
5.Which of the following best explains the concept of “getting lost” in a group?
Which set of transition words, in order, best clarifies the order of events in the passage? Anna Mae walked past the barn toward the house. 1, she heard a stran