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

can someone help me with this ASAP
The words associate and disassociate have opposite meanings. They are
A lava lamp is a decorative item found in some homes. The lamp portion contains a waxy substance in a liquid medium. When the lamp is plugged in, a bulb at the
45% of _____________is 165
2+2=??????????????????/
WHY IS IT ALSO CALLED THE RED PYRAMID?
I need to write an essay about the play "Everyman" and I don't understand it. can someone please explain it to me? thanks in advance
1. Define idiom and explain what is meant by, "Pennies saved one and two at a time bulldozing the grocer and the vegetable man and the butcher until one's cheek
I NEED HELP ASAP IT IS DUE TODAY!!, Lori needs a length of twine 8.5 meters long to mark a row in her garden. Andrew needs a length of twine 7.28 meters long f
8x___=0.24 please help me with this-