RK wrote...
How can I complement binary numbers so that 0 becomes 1 and 1 becomes
0. Also, is there a way to reverse the order of binary digits (i.e.
write backward)?
First question:
=TEXT(SUMPRODUCT(1-MID(x,ROW(INDIRECT("1:"&LEN(x))),1),
10^(LEN(x)-ROW(INDIRECT("1:"&LEN(x))))),REPT("0",LEN(x)))
Second question:
=TEXT(SUMPRODUCT(--MID(x,ROW(INDIRECT("1:"&LEN(x))),1),
10^(ROW(INDIRECT("1:"&LEN(x)))-1)),REPT("0",LEN(x)))
This only works for 15 or fewer binary digits. You'd have to chop up
longer binary numbers into 8-byte portions, apply these formulas to the
pieces, then concatenate their results to give the desired results.