Dovetail two blocks of bits Check if two blocks of bits dovetail perfectly.
Specifications

A block of bits is a fixed sequence of 8 bits just like this for example : 11110101.

For simplicity we refer to truthy/falsey values as 1/0 bits but they can be everything capable of representing those two states in a clear, well defined and consistent way, for example :0/1 x/y False/True &quot;false&quot;/&quot;true&quot; 'a'/'b' []/[...] odd/even &gt;0 / &lt;0  0 / !0


What does it mean dovetail perfectly?

1's bits of one block can fit only into 0's of the other block or outside it.

You can shift an entire block left or right but you cannot modify a block nor reverse it.

The resulting block must contain all 1's of both inputted blocks and only those.

There must not be any 0's between 1's while there can be any trailing and leading 0's.

The resulting block can be more than 8 bits long.

Example


 
 Input : [ 10010111, 01011010 ]
 
             10010111 
             ↓  ↓ ↓↓↓
           01011010   &lt- shif by 2
  result   0111111111  =&gt dovetails perfectly 
 
Input: two blocks of bits.

You don't need to handle empty blocks (all 0's).

Output: your solution have to clearly state if input blocks can dovetail perfectly as described above or not.

the resulting block won't be a valid answer.

Test cases.
00000000, 00000000 | you don't  
00000000, ...      | need to
...     , 00000000 | handle these

11111111, 11111111 -&gt; True
11111111, 10000000 -&gt; True
11110000, 00101000 -&gt; False 
00101000, 10100000 -&gt; True
10000000, 00111000 -&gt; True
00110011, 11001100 -&gt; True
00010000, 11101010 -&gt; False
10000100, 10111101 -&gt; True 
01111010, 01011111 -&gt; True 
10010101, 00001101 -&gt; False 
01010011, 10110000 -&gt; True
00000111, 00010011 -&gt; False
00000011, 00000101 -&gt; False

Rules

Input/output can be given by any convenient method.
You can print it to STDOUT, return it as a function result or error message/s.
Either a full program or a function are acceptable.
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.


Sandbox
JavaScript (ES6),  63 54 52  50 bytes
Saved 2 bytes by applying an optimization similar to the one suggested by @AZTECCO on my C answer
Expects (a)(b), where a and b are bytes. Returns 0 if the blocks can dovetail perfectly or 1 otherwise.
a=&gt;g=b=&gt;b?a&lt;&lt;8&amp;b|(c=a&lt;&lt;8|b,c+=c&amp;-c)&amp;c-1&amp;&amp;g(b&lt;&lt;1):1

Try it online!
How?
The recursive function g attempts to shift b to the left, 1 position at a time, until the following conditions are both met:

(a &lt;&lt; 8) &amp; b is equal to 0, i.e. a &lt;&lt; 8 and b have no set bits in common
c = (a &lt;&lt; 8) | b is a sequence of consecutive 1's, possibly followed by trailing 0's

For the second test, we add to c the rightmost set bit in c and see if this results in a single 1, by carry propagation along the sequence of consecutive 1's.
We use the following bitwise tricks:
c &amp; -c      // returns the rightmost set bit in c

c &amp; (c - 1) // returns c without the rightmost set bit in c
            // (0 if c is an exact power of 2)

Example:
0111111000 + (0111111000 &amp; -0111111000) = 0111111000 + 0000001000 = 1000000000
1000000000 &amp; (1000000000 - 1) = 1000000000 &amp; 0111111111 = 0

We stop the recursion when b = 0, which means that all bits have been thrown away. (This is why we do b &lt;&lt; 1 instead of b * 2, so that b is forced to a 32-bit integer rather than an IEEE 754 floating-point number.)