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

Divide a quantity into two parts in a given ratio.
An irregular polygon is shown below: The area of the irregular polygon is ___ square units. Image of irregular polygon with length of 7 units and height of 3 un
-1-2•[(-1)+5)} I am so lost on these math problems
3 ½ + 1 1/3 help me out I’ll give you v bucks
PLS HELP!! WILL GIVE BRAINLIEST!!! ASAP!! 2) Which number from the set {0, 1, 4, 6} makes the inequality true? 6x - 3> 21 A) 0 B) 1 C) 4 D) 6
how do photoynthesis and cellular respiration work together to make ecosystems function?
examine examples of personification in the ballad "The owl and the Cat," How is personification used in the ballad?
En este apartado se tiene que dejar una idea clara de por qué hay que defender tal o cual postura. Es preciso guiar al lector a la reflexión y convencerlo de la
Triangle FGH is similar to triangle A B C
NEED HELP FAST!!! RLY NEED HELP FAST!!!