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 ratio of teachers to students at Hickory school is 123 there a 25 students at the school how many students are at the school
An organism of the kingdom Protista could be _______.
Which of these is an environmental consequence of the shrinking of the Aral Sea? the salt content of the water has increased more nesting birds have come to it
Please help me (numbers 1-8 please)
Which step is basic to making an inference? A.focusing on the main ideas B.examining clues in the text C.restating in simpler words D.separating fact fr
3x(x-2)=0 solving quadratics
Which sentence uses punctuation correctly? We read, Shakespeare's tragedy Othello, after reading two of his comedies. We read Shakespeare's tragedy, Othello, af
? How do you do this
Please help me with this??
Using two-step equations to solve problems: You need to download 3 games for your math class. Each game is the same price. Since this is your first time downloa