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 does it mean to solve an equation 1.4y = 3.5
answer asap pls no wrong answers
find the sum of the GP 8/10, 8/100, 8/1000..... n terms​
If there is sufficient water in the reaction system, how many grams of KOH can be produced from 22.2 g of K?
Find the common ratio 24,18,37/2,81/8
A macro element that is a component of ATP
Read the first stanza of the poem "the raven" by edgar allan poe which line from the stanza best supports the idea that the speaker was reading at the beginning
Please help me with this
PLZZZZ HELPPPPPP MEEEEEE!!!!!! ASAP!!! ILL GIVE 20 POINTS AND BRAINLIEST!!! :'(
if (5a-1) is divided by b, the result is 3 and the remainder is 4. If (b+8) is divided by a, the result is 3 and the remainder is 1/4a (¼a). Form two equations