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

Please answer the questions below need asap before thursday 1. Draw two pedigrees for this family, one for eye colour and another for ear shape be sure to inclu
180kg divided in the ratio 1:8
Stream at 110 bar a specific volume of 0.0196 m3/ kg find the temperature, theenthalpy and the internal energy
% of all tobacco use occurring before age 26 A) 80% B) 90% C) 95% D) 99%
how did the outcome of world war 1 most directly contribute to the onset of the great depression
It was wronghzjzjhxhdjdjshhgzjsb
Name any two text properties that can be applied in css. Give the syntax
What is career month all about
What happens that indicates the beginning of the Otto cycle? a. Piston at TDC at beginning of intake stroke b. Piston at TDC at beginning of compression stroke
explain all students should be required to perform one year of community service​