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

A sewing club used 48 feet of fabric to make 8 blankets. At this rate how many blankets can be made from 6 yards of fabric?
the sales tax in Illinois is 6.25%. about how much will a pair of jeans that has a ticket price of $48.99 cost, including sales tax?
Jon has $45.00.He plans to spend 4/5 of his money on sports equipment .How much will he spen .Show Work.
Please help and explain how to do it
why is an objects density expressed as a combination of two units
Which words make up the adverb phrase in the sentence? Which words does the adverb phrase modify? Many early cities were built around forts. A. Many early; modi
how do you say do you wanna fight me in French?
simplify ratio 1.5:2.5
a volcanic eruption takes place under the ocean. Huge waves crash against the shores and destroy houses of people. Which earth systems interact during this proc
how many significant digits are in 80,000