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

What time is trick or treating in south bend indiana?
Meiosis can result in the formation of O 4 sperm cells O 1 healthy egg cell and 3 polar bodies gametes O all of these can be produced by Meiosis
What does the one-word statement somehow suggest?
1. Name two cities that were part of the Mongol Empire in 1294?2. Was Japan ever a part of the Mongol Empire?3. Name two cities that were part of the Mongol Emp
The March to the Sea took place across which state?
What is the slope???​
A worksheet where totals from other worksheets are displayed and summarized is a what?
Is 9,912 - - 798 positive or negative? positive negative PLS HELP ITS ON IXL I CANT GET IT WRONG!!
Hàng ngày ta thấy Mặt trời , Mặt trăng quay quanh Trái Đất, khi đó ta đã lấy vật mốc là
should the US make Election Day a National Holiday? Why or Why not?