ACSL Bit String Flicking

1.2k views Asked by At

I need help with an ACSL Problem. The contest was done in 2014-2015. It is just practice and I want to see if I did the problem correctly.

Bit-String Flicking:

Solve for x (5 bits) in the following equation. How many unique solutions are there?

(RCIRC-2(LSHIFT-1 (NOT X)))=00101

After solving I got 16 unique solutions although I can't find the answer anywhere and need the help of you smart and creative people!

Thanks

2

There are 2 answers

0
cake archer On

Represent each bit as letters A-E

(RCIRC-2(LSHIFT-1(NOT ABCDE))) = 00101

(RCIRC-2(LSHIFT-1(abcde))) = 00101

(RCIRC-2(bcde0)) = 00101

e0bcd = 00101

E0BCD = 10010

B = 0, C = 1, D = 0, E = 1

X = *0101

0
PatrikWWDC On

Here's the idea to solve this problem:

  1. transfer RCIRC, LSHIFT and NOT to the other side like this:

RCIRC-2(LSHIFT-1(NOT X))=00101 -> LSHIFT-1(NOT X) = LCIRC-2(00101)

LSHIFT-1(NOT X) = LCIRC-2(00101) -> NOT X = RSHIFT-1(LCIRC-2(00101))

NOT X = RSHIFT-1(LCIRC-2(00101)) -> X = NOT(RSHIFT-1(LCIRC-2(00101)))

X = NOT(RSHIFT-1(LCIRC-2(00101)))

  1. solve it:

X = NOT(RSHIFT-1(LCIRC-2(00101)))

X = NOT(RSHIFT-1(10100))

X = NOT(01010)

X = 10101

And that would be it. The point is that when you transfer from one side to another you convert left to right and right to left.

So it's only one correct solution!