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

what era of prehistory lasted from 2 million B.C. to about 10,000 B.C.
In the story, who made suits for a department store? Sancho Bolsa the groundskeeper William
which country developed the fastest ships during the 1400s?
Yolanda is filling her bathtub. The table shows the number of gallons of water in bathtub at different times since she started filling it. Time- 1 minute, 1.5 m
From graph we can see that at low temperature ice cream consumption per person is less it means few person buy ice cream in low temperature season but as temper
3-5 page paper discussing three 21st century skills
convert 5 2/5 into an improper fraction ​
How do you write 0.1 as a fraction?
why did many people in Europe feel that the black death was happening?
As of December 31, Year 2, Moss Company had total cash of $195,000, notes payable of $90,500, and common stock of $84,500. During Year 3, Moss earned $42,000 of