Can anyone explain why the last result in these statements is not the bit-flipped version of arr?
(Debug) In[189]:= arr = {0, 0, 1, 0, 0, 0, 1, 0}
(Debug) Out[189]= {0, 0, 1, 0, 0, 0, 1, 0}
(Debug) In[190]:= FromDigits[%, 2]
(Debug) Out[190]= 34
(Debug) In[191]:= BitNot[%]
(Debug) Out[191]= -35
(Debug) In[192]:= IntegerDigits[%, 2, 8]
(Debug) Out[192]= {0, 0, 1, 0, 0, 0, 1, 1}
bugstag, since that requires verification by other users. – Chris K Mar 12 '19 at 21:48Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
– Chris K Mar 12 '19 at 21:49BitNot[n]is simply equivalent to-1-n." – Greg Hurst Mar 12 '19 at 22:00UnitBox[arr]? – OkkesDulgerci Mar 12 '19 at 22:09BitXor[1,array]... – ciao Mar 14 '19 at 06:34