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 drop in oil prices in the 1980's probably helped to convince venezuala to ? A.import more oil B. increase its use of hydroelectricity C. diversity its eco
What's the value of x?
The spindle apparatus disintegrates during _____. anaphase telophase interphase metaphase
Which one is greater 100 fl oz or 16 pt
The events over the course of a year happen one at a time, therefore a timeline would be appropriate. The timeline must be presented a. As a straight line c. A
There are 320 rods in a mile, what part of a mile is 1 rod?
¿Servimos la ensalada de melón ahora? —Sí, _____ enseguida. A. la sirven B. sirvas C. sírvanla D. sírvela
True or False: It is wise to consider your needs when making consumer decisions
What is the coefficient of n^2 in the sum of -5^4+4n^2-n+5 and 7n^4-5n^3-9n^2+3n+2
what are the 6 last month on the year