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

in which two ways do extras function in a drama
What is 21.285 rounded to the nearest cent?
What are some Examples Of selflessness?
politically, how was early Sumerian society organized? How did that affect society?
Mr. Roberts sees a rare 1937 penny. The cost of the penny is $210.If he saves $3 each week, will Mr.Roberts have enough money to buy the penny in one year? Expl
How is a serious play with an unhappy ending classified? a comedy a tragedy a history?
Very often, something you read will remind you of something that’s happened in your life or something else you’ve thought about. does life imitate art or does a
Who is Central America’s main trading partner? Mexico Venezuela The United States Canada
You buy 6 apples at $0.49/apple, 1 gallon of milk at $3.48/gallon, and 2 loaves of bread at $1.49/loaf. How much was your total purchase? $9.40 $5.46 $7.93
how do you do this, how do you get the percentages to come