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

NEED HELP NOW!!!! Match the functions with correct transformation. f(x) = -3x f(x) = |x-1|+3 f(x) = √(x+3) 1/2x² f(x) = (x+1)²-3 4|x| 1. compress by a factor
what is 8/10 estimated to
I Need Assistance With These
Whit h equation best represents this situation the number 98 increased by an unknown number equal to 120
Melanie is buying a bathing suit that costs 39.99. she is given a discount at the cash register of $6.00 when she scratched 15% off on a game piece for a store
what is the measure of angle x? PLEASE ANSWER
The Byzantine empire weakened after the_____captured Asia Minor
Three numbers X, Y, and Z are in the ratio 2:7:8. If 12 is subtracted from Y, then three numbers form a geometric sequence (in the order X, Y–12, Z). Find X, Y,
What is text structure
Rewrite the following quadratic functions in intercept or factored form. Show your work. f(x) = 3x^2 - 12