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

The cost in dollars to produce x cups of lemonade is represented by the function C(x)=10+0.20x. The revenue in dollars earned by selling x cups of lemonade is r
Physical property is best measured using only balance a: mass b: density c:color d:volume
pls answer fast it is urgent I promise if your answer is correct I will mark you as a brainlist​
units of dna that encode for specific characteristics
secretion of a substance from a cell or structure is a function of the
Prem earns Rs. 16000 a month. He spends half of his income on food, three - tenth of the remaining income on house rent and Rs. 2050 on education of his son. Ho
Write an equation in slope-Intercept form for the line with slope 2/5 and y- intercept - 3
What do the beaches of both the U.S. east coast and U.S. west coast have in common?
someone pls help me;-;
Which reason best describes why you can divide any number by 1,000 1,000 by moving the decimal point three places to the left? CLEAR CHECK Moving the decimal