Quantcast
Channel: Active questions tagged real-analysis - Mathematics Stack Exchange
Viewing all articles
Browse latest Browse all 8803

How to make a common operation function that will convert 011 to 1010 and 000 to 1110 [closed]

$
0
0

For a problem. Very tricky!There are 12 operations:

  a. Addition of 1 from the left (Example: 000 -> 1000)  b. Addition of 0 from the left (Example: 111 -> 0111)  c. Addition of 1 from the right(Example: 000 -> 0001)  d. Addition of 0 from the right  (Example: 111 -> 1110)  e. Shift by 1 from the left(Example: 000 -> 100)  f. Shift by 0 from the left(Example: 111 -> 011)  g. Shift by 1 from the right(Example: 000 -> 001)  h. Shift by 0 from the right  (Example: 111 -> 110)  i. Reverse (Example: 0011 -> 1100)  j. Start bit change(Example: 000 -> 100)  k. End bit change(Example: 000 -> 001)  l. All bit change(Example: 000 -> 111)

Following these operations 011 can be converted to 1010 by operation a -> i

011

  1. 1011 //Applying a
  2. 1010 //k

Following these operations 000 can be converted to 1110 by operation a -> e -> e

000

  1. 1000 //a
  2. 1100 //e
  3. 1110 //e

How to make a common operation function that will convert 011 to 1010 and 000 to 1110


Viewing all articles
Browse latest Browse all 8803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>