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

After the Stamp Act, what did those who opposed the British taxes begin to call themselves?
What causes you to pay the prices that you do for these goods and services? What determines the price that's on the price tag? What goes into determining, or se
Which of the following were advanced by trade in the second millennium? Select all that apply. civilizations cultural exchanges mercantilism women's roles lang
The radius of a molybdenum atom is 136 pm. how many molybdenum atoms would have to be laid side by side to span a distance of 2.52 mm
The shortcut key combination to cut text is_____ .
Two football players each applied 100 n of force to sack the qb and move him 3 meters downfield. How much work was done?
The difference of two numbers is 40. Their sum is 66. Find the numbers.
In what way did ww2 increase domestic work opportunities for minories
math question down below
What is the job description of a pathologist?