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

Why cant 7 be a remainder in 6499 divided by 7
Simplify: 3(8) 0 • (3) –2
where do I graph it at ?? PLEASEE HELP.!! ILL GIVE BRAINLIEST.!! *EXTRA POINTS* DONT SKIP:((
What is this, and where is it located. It is not the Lincoln Memorial, it is not the Supreme Court. ****** Whoever is the first to answer and if they are right,
| 11-2 | Please help me with this
Informar de esto Sera una risa para mi...soplon
What is the trend in atomic radius as you go across a period
Which scientific term could be used in place of the word germ? a. bacteriology b. pathogen c. host d. replicate
Which if the following is the most commercially successful fiber, responsible for about half of all fiber production in the world? * 1 point Cotton Rayon Silk P
The aircraft in the picture above possesses potential and kinetic energy. True False