# String to Bit Transition

## Python 2, 58 bytes

```
n=1
for c in input():n=n<<7|ord(c)
print'1'+bin(n^n/2)[4:]
```

Try it online!

## MATL, 9 bytes

```
Hj7&B!hdg
```

Try it online!

### Explanation

```
H % Push 2
j % Read line of input, unevaluated
7&B % Convert to binary with 7 bits. Gives a 7-column matrix
! % Transpose
h % Concatenate horiontally. The matrix is read in column-major order
d % Consecutive differences
g % Convert to logical. Implicitly display
```

## Japt `-P`

, 11 bytes

Takes advantage of the fact that spaces can be coerced to `0`

in JavaScript when trying to perform a mathematical or, in this case, bitwise operation on it.

```
c_¤ù7Ãä^ i1
```

Try it or run all test cases

```
c_¤ù7Ãä^ i1 :Implicit input of string
c_ :Map codepoints
¤ : Convert to binary string
ù7 : Left pad with spaces to length 7
Ã :End map
ä^ :XOR consecutive pairs
i1 :Prepend 1
:Implicitly join and output
```