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

6.) Which pronoun best completes the sentence? No other girl in the choir can sing as well as __________ . A. they B. her C. me D. she 7.) Which pronoun be
Which fraction is equivalent to 2/7
two trains leave stations 408 miles apart at the same time and travel toward eachother. one train travels at 95 miles per hour while the other travels at 75 mil
What would be most useful to help make a simple compass a nonmetal bar,a round metal can,a small iron nail,or a Quartz needle
Juan Ramirez sells suits in a major department store on weekends. he earns a commission of 5 percent on the first ten suits, and if he sells more than ten, he e
What is .5v^1/3 Can u please help? Ian super lost!!!!!!
whats the integral of 1/X
log4(x)+log4(x+15)=2
what is the largest prime factor of 34
what are three major water problems in southwest asia?please help!