Reverse of binary number

286 Views Asked by At

Let us say that x is a set of binary numbers $$x = \{0, 1, 1001\}$$ Am I correct that $x^R$ is equal $$x^R = \{0,1,1001\}$$ or is it: $$x^R = \{1,0,0110\}$$ What I mean by that is: do we create a reversal for binary by a switch between zeros and ones, or do we do it by putting the whole set in diverted order?

2

There are 2 best solutions below

0
On BEST ANSWER

If $w = a_1a_2 \cdots a_n$ is a (binary) word, then $w^R = a_n \cdots a_2a_1$. If $L$ is a set of words, then $L^R = \{w^R \mid w \in L\}$. Therefore, $\{0,1,1001\}^R = \{0,1,1001\}$.

3
On

The reversal of $1001$ is $1001$. (You could have chosen a better example!) $0110$ is the complement (or ones' complement) of $1001$.