[Question]
  [
This challenge is based on a sandbox post by [user48538](https://codegolf.stackexchange.com/users/48538/user48538). Since he is no longer active on this site, I took over this challenge.
---
[apgsearch](http://www.conwaylife.com/wiki/Apgsearch), the distributed soup search program for Conway's Game of Life and the search results database, [Catagolue](http://www.conwaylife.com/wiki/Catagolue) use **[apgcodes](http://www.conwaylife.com/wiki/Apgcode)** to classify and denote patterns. apgcodes themselves use the **extended Wechsler format**, an extension of a pattern notation developed by Allan Wechsler in 1992.
The following examples and the images are taken from [LifeWiki](http://www.conwaylife.com/wiki/Apgcode#Examples).
1. A string of *n* characters in the set matching the regex `[0-9a-v]` denotes a strip of five rows, *n* columns wide. Each character denotes five cells in a vertical column corresponding to the bitstrings [`00000`, `10000`, `01000`... `00010`, `10010`, `01010`, `11010`... `11111`].
For instance, `27deee6` corresponds to a [heavyweight spaceship](http://www.conwaylife.com/wiki/HWSS):
[![27deee6](https://i.stack.imgur.com/XDmL7.png)](https://i.stack.imgur.com/XDmL7.png)
$$ \begin{bmatrix} 
{\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
1 & 1 & {\color{Gray}0} & 1 & 1 & 1 & 1 \\
{\color{Gray}0} & 1 & 1 & 1 & 1 & 1 & 1 \\
{\color{Gray}0} & {\color{Gray}0} & 1 & 1 & 1 & 1 & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0}
\end{bmatrix} $$
2. The character `z` separates contiguous five-row strips.
For example, `0ca178b96z69d1d96` corresponds to a 31-bit still life:
[![enter image description here](https://i.stack.imgur.com/zhhrj.png)](https://i.stack.imgur.com/zhhrj.png)
[![enter image description here](https://i.stack.imgur.com/63Txx.png)](https://i.stack.imgur.com/63Txx.png)
$$ \begin{bmatrix} 
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 \\
{\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 \\
{\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & 1 & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & 1 & 1 & 1 & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} \\
1 & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & 1 & 1 & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0}
\end{bmatrix} $$
3. The characters `w` and `x` are used to abbreviate `00` and `000`, respectively.
So `w33z8kqrqk8zzzx33` corresponds to a [trans-queen bee shuttle](http://www.conwaylife.com/wiki/Trans-queen-bee-shuttle):
[![enter image description here](https://i.stack.imgur.com/98NUn.png)](https://i.stack.imgur.com/98NUn.png)
[![enter image description here](https://i.stack.imgur.com/8bY5W.png)](https://i.stack.imgur.com/8bY5W.png)
(10 blank rows omitted)
[![enter image description here](https://i.stack.imgur.com/iVYqx.png)](https://i.stack.imgur.com/iVYqx.png)
$$ \begin{bmatrix} 
{\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & 1 & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} \\
1 & {\color{Gray}0} & 1 & 1 & 1 & {\color{Gray}0} & 1 \\
{\color{Gray}0} & 1 & 1 & 1 & 1 & 1 & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0}
\end{bmatrix} $$
4. Finally, the symbols matching the regex `y[0-9a-z]` correspond to runs of between 4 and 39 consecutive `0`s.
A good example is `31a08zy0123cko`, corresponding to a [ship on quadpole](http://www.conwaylife.com/wiki/Quadpole_on_ship):
[![enter image description here](https://i.stack.imgur.com/nyWOZ.png)](https://i.stack.imgur.com/nyWOZ.png)
[![enter image description here](https://i.stack.imgur.com/UKAnT.png)](https://i.stack.imgur.com/UKAnT.png)
$$ \begin{bmatrix} 
1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
1 & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1 & {\color{Gray}0} \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & {\color{Gray}0} & 1 \\
{\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & {\color{Gray}0} & 1 & 1
\end{bmatrix} $$
## The Challenge
Write a program or a function to parse a string of the extended Wechsler format, defined above, and print (or return) the pattern corresponding to this string.
You may assume that the string is nonempty, and does not start or end with `z`.
You may use any reasonable output format, e.g., a string, a matrix, a 2d array. You may use any two values to represent `0` and `1`, given that you declare them in the answer.
You may omit the trailing zeroes lines in the output, or add extra trailing zeroes lines. You may also add/omit trailing zeroes on each line, as long as all lines have the same length in the output.
You may return the transpose of the array, if that is more convenient.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code wins.
## Test cases
```
153 => [[1, 1, 1], [0, 0, 1], [0, 1, 0], [0, 0, 0], [0, 0, 0]]
27deee6 => [[0, 1, 1, 0, 0, 0, 0], [1, 1, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]
0ca178b96z69d1d96 => [[0, 0, 0, 1, 1, 0, 1, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 0, 1, 0, 0, 0, 1], [0, 1, 1, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]
w33z8kqrqk8zzzx33 => [[0, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]
31a08zy0123cko => [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1]]
o5995ozes88sezw33 => [[0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0], [1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
y3343x6bacy6cab6x343zkk8yy8kkzgo8gywg8ogz0123yw321zzgo4syws4ogzgh1yy1hgz221yy122zy3c2cx6d53y635d6xc2c => [[0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
```
  
[Answer]
# JavaScript (ES8), 197 bytes
Takes input as a string. Returns an array of strings with '#' and spaces. The output may include extra (but consistent) trailing spaces on each line.
```
s=>[x='x',...s.replace(/w|x|y./g,s=>''.padEnd(s<x?2:s>x?P(s[1],36)+4:3),P=parseInt)].map(c=>[!++w,1,2,3,4].map(i=>c<x?o[y+i-5]+=' #'[P(c,36)>>i&1]:o=[...++y&&o,'']),w=y=o=[])&&o.map(r=>r.padEnd(w))
```
[Try it online!](https://tio.run/##TY/PctsgEIfveQrXmTFiRBQDEkGeopx66M13VQeMiKLIFYrwVMDkAfoEfcC@iIv7J@5tf9/ufrP7Ir9Jq@Z@Ot2NptXnJ3G2oqqdAA6gLMtsNuvpKJVO7pc39@az@w7FAQCySbafxjaxH90j2dnKPe4TW@MGUQbTfEch2otJzlZ/Hk@wyb7KKVFR/CFNF4QRQRTlf2gvKhUdpvZpf1c0qQCrW1DvE3UxVVW/wc3OiDrekqZ@szEIgAaiRXgRaQMj@a2ZRTX/u2mB8HzS9rQSK7sS1UqZ0Zqjzo6mS54SC7MX048J@DICeH3vNn4Gfv74DiC8ublsJ2tc0DX8W5OHVmvN3vNWSfzADyULrGxxW147C6WBD6/z68BDCI5eHRTLLQ9@iwlVg3nHpijLwgRtObc6LP8teEpz6thBKs@UPDAXYxgG7j0fhtAZ3vml46YLF6VfKMEh0tz6xeaRds/Ye/zcBUIuBSHBU0WUY21BPaNFy1yMa3j@BQ "JavaScript (Node.js) – Try It Online") (prettified output)
## How?
### Global variables
* The character `"x"` is used several times, so it's worth storing it into the variable **x**.
* The function `parseInt` is used twice, so it's worth storing it into the variable **P**.
* **y** is the row index, initialized to **0**.
* **w** keeps track of an upper bound of the width which is used to pad the final output.
* **o[ ]** is the output array, initially empty.
### Pre-processing of repeated zeros
We first replace all patterns `"w"`, `"x"` and `"yX"` in the input string with the appropriate number of spaces. These spaces will later be interpreted as `"0"`.
```
s.replace(
  /w|x|y./g,
  s => ''.padEnd(
    // w --> 2
    s < x ? 2 :
    // yX --> value of X + 4
    s > x ? P(s[1], 36) + 4 :
    // x --> 3
    3
  )
)
```
### Decoding
We split the resulting string, prepend an initial `"x"` and iterate 5 times (with **i** = **0** to **4**) on each character **c**:
* If **c** is lower than `"x"`, we append the corresponding pattern to the next 5 rows.
```
o[y + i - 5] += ' #'[P(c, 36) >> i & 1]
```
* If **c** is greater than or equal to `"x"`, we allocate 5 new empty strings in **o[ ]** and add **5** to **y**. This is triggered by the initial `"x"` that was added at the beginning of the string, or by any `"z"` in the original content.
```
o = [...++y && o, '']
```
### Padding
Finally, we pad each string in **o[ ]** with spaces so that they all have **w** characters.
```
o.map(r => r.padEnd(w))
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/), ~~148~~ ~~132~~ 98 bytes
I'm a highschool student and this was my first time for both golfing and using 05AB1E, so comments are appreciated!
```
„YY¾38×:'Yð:žLRDUsð«#εNĀiDнXsk4+s¦sú]'W¾2×:'X¾3×:J'Z¶:.Bð¾:vNUyvDykDNX‚Š32VY‹iY+b¦RX_i¶ì}‚ˆ]¯{€¦˜J
```
~~[Try it online!](https://tio.run/##JY2xSsRAFEX/ZbcIGIXJTDKELQRhqi0CK2SJhUWSlUlIscXAJm8kYCX4BdtaCZKAaSIrqMUMVkLwG/ZH4kSLx3v3cs99yIsT52YcZwAzCxFf7xcW6G7x9ZldqIaFQneqmQ99cH58eMzZz0ckCtcW6kkgofe6rWurtBCesMrwZi8tafg/jOnn4cDDoWc8EmcToJp6F4SwCzzV2WZOInvNoGAEH@/e8oRx7z@n28sIrXL1aj5cTV26/b7XDfFWOQrRWr1fq5fboZ8Ph3p5Oo5AiEsqmsQp0DROaGWkLAofwC8Kybc@h5L7Wy6RgwmUBDvSuK6AUrjG5ZkD4GRcYjwdGEsgKU4ruvEIUOJtaGXkLw "05AB1E – Try It Online")~~
~~[Try it online!](https://tio.run/##JY2xSsRAFEX/ZbdYMAjJTDKELQRhqi0CCpFYWCTZZRKm2GJgkzcSEBHBL9jWSpAE3CayFqaYwUoIfkN@JE60eLx3L/fcZ3tx4mzGcQYwUx329X65AH1YfnXZuappKPRB1fO@Dc6Gp@ec/nxGgruWUC/CFnqvm6paFKpDE1Ya3uzVQhr@D6P6tT@ysG8pi8TpBKi62gUh7ILh/sEycxJZVxQ4xWi4@8gTyrz/nG4uI/siV@/mw/XUpZvvxxv1dtu38/5YrcYRMHZxSZI4BZLGCSmNlJz7AD7nkm19BgXzt0zaDsJQYORI47oCCuEal2UOgJMxidB0ICQBpygtydrDQLC3JqWRvw "05AB1E – Try It Online")~~
[Try it online!](https://tio.run/##MzBNTDJM/V/6/1HDvMjIQ/uMLQ5Pt1KPPLzB6ug@nyCX0OLDGw6tVj631e9IQ6bLhb0Rxdkm2sWHlhUf3hWrHn5onxFIdQRQG5D2Uo86tM1KzwmoY59VmV9oZZlLZbaLX8SjhllHFxgbhUU@atiZGamddGhZUER85qFth9fUAqVOt8UeWl/9qGnNoWWn53j9VzdUfzStw0rdQF3P6r@hqTEA "05AB1E – Try It Online")
Takes input as uppercase and outputs the transposed matrix as multiple output lines of 1s and 0s. May add extra zeros.
If you want to test with lowercase strings, add `u` in the TIO header.
If you want pretty-printed output, add `'1'█:'0'.:` in the TIO footer.
# Explanation
(I'm calling "rows" and "columns" opposite of what you might expect because it generates the transposed matrix)
The basic algorithm is:
1. Replace "yy" with 38 0s
2. Split on "y" and and expand the 0-runs.
3. Replace "w" and "x"
4. Figure out the longest column (that is, the longest string between z's) and pad all the other columns so they are that length. (This is necessary because of how the algorithm below works)
5. Split on z
6. At this point, the input string is an array of columns where each column is a string of [0-9A-V], where each column is the same length.
7. The algorithm to get it into the output format is to
	1. Convert the characters to numbers by using indexOf in a lookup string
	2. Convert the characters to binary and then pad to length 5
	3. If it is the first column, add a linebreak before the binary number
	4. Add a prefix to the beginning of the binary string that stores the row and then the column of the character.
	5. Push the binary string with prefix to 05AB1E's "global array" register/variable
8. Sort the global array. The prefix string, which determines the sort order, will make sure everything ends up in the right order and the linebreaks are in the right places.
9. Remove the prefix string from each element of the global array
10. Join the array with "" and print it.
There are some other minor details you can see below in the expanded code. Everything after the tabs at the end of a line is a comment and can be ignored. (This comment scheme is not part of 05AB1E, by the way. I did it this way because it looked nice.) Lines that have comments starting with "@" are for debugging purposes and can be omitted without changing the final output.
```
„YY¾38×:                                        Replace "YY" with 38 0's. (y is the 34th character in the index, so need to add 34+4 = 38). ¾ is initialized to zero, which saves one byte from typing '038
'Yð:                                            Replace "Y" with " "                                
"Replaced input Stage1 = "?D,                   @DEBUG
žLR                                             Pushes [0-9A-Za-z]
DU                                              Set X to [0-9A-Za-z] and leave [0-9A-Za-z] on the stack.
s                                               Swap top two elements. Now the stack is [0-9A-Za-z],input
ð«                                              Append a space so the below splitter works even if there are no other spaces.
#                                               Split input on " ", which "Y" has been replaced with
ε                                               Map. This map replaces the y runs
    "Element = "?D,                             @DEBUG
    "N = "?N,                                   @DEBUG
    NĀi                                         If N != 0   
        "Replacing!",                           @DEBUG
        Dн                                      Get the first letter
        X                                       Push X
        s                                       Swap
        k                                       X (which is [0-9A-Za-z]) .indexOf(firstLetter)
        "indexOf run token = "?D,               @DEBUG
        4+                                      Add 4 to the index, now becoming the number of zeros to add
        s                                       Swap. Now top is the string between runs
        ¦                                       Remove the first character
        s                                       Swap again. Now the top is the number of zeros to add.
        ú                                       Add that many spaces (will be replaced with zeros later) to the start of the element.
        "Element Replaced = "?D,                @DEBUG
]
'W¾2×:                                          Need to do this replacement after the Y replacement so stuff like YW gets parsed properly. Again, ¾ is zero.
'X¾3×:
J                                               Join with ""
"Replaced input Stage2 = "?D,                   @DEBUG
'Z¶:                                            Replace "Z" with "¶".
.B                                              "Squarify" command. Splits on \n and appends spaces to the end of each element so each is the same length. In this case, that is equivalent to adding zeros to the end of each column, which is what we want.
ð¾:                                             Replace spaces (which we used for padding above) with zeros.
"Replaced input Stage3 = "?D,                   @DEBUG
"0 Stack top = "?D,                             @SDEBUG
"0 Stack top-1 = "?sD,s                         @SDEBUG
v                                               pop and loop over top element, which is array of column code
    NU                                          Store the column number in X
    yv                                          Loop over each character in the column              
        "1 Stack top = "?D,                     @SDEBUG
        "1 Stack top = "?D,                     @SDEBUG
        D                                       Duplicate top element (which is now [0-9A-Za-z])
        y                                       Push y (special loop variable)
        "Character = "?D,                       @DEBUG
        k                                       Push indexOf y in [0-9A-Za-z]
        "Index = "?D,                           @DEBUG
        "2.1 Stack top = "?D,                   @SDEBUG
        "2.1 Stack top-1 = "?sD,s               @SDEBUG
        D                                       Duplicate index.
        NX‚                                     Push [rowNumber,columnNumber]. This result is used for sorting.
        Š                                       Triple swap. The top of the stack is now sortPrefix, index, index
        32V                                     Set Y to 32
        Y‹i                                     index < 32. This uses up one copy of index
            Y+                                  Add 32 to the index
            b                                   Push the index in binary. This uses the second copy of index. 
            ¦                                   Remove the first character, which will be a 1 because we added 32. The result is now a padded binary string of length 5
            "Binary = "?D,                      @SDEBUG
            R                                   Reverse the binary string. This gives the proper transposed output. 
            X_i                                 This will only run if X (which is set to the column number) == 0. (Runs !X)
                ¶ì                              Stick a linebreak at the beginning of the binary string
            }
            "2.5 Stack top = "?D,               @SDEBUG
            "2.5 Stack top-1 = "?sD,s           @SDEBUG         
            ‚                                   At this point the top of the stack is sortPrefix,binaryString. This will combine the two into a list.
            "Pushing '"?D?"'",                  @DEBUG
            ˆ                                   Push [[rowNumber,columnNumber],binaryString] to global array
            "2.6 Stack top = "?D,               @SDEBUG
            "2.6 Stack top-1 = "?sD,s           @SDEBUG
        ]                                       Close all blocks
¯                                               Push global array
{                                               Sort global array. 
"Sorted Data = "?D,                             @DEBUG
€¦                                              Remove the sort prefix              
˜                                               Flatten. Before doing this, the array is in the format [[<binary string>],[<binary string>],[<binary string>],...]
J                                               Join with ""
'1'█:'0'.:                                      @DEBUG pretty print 
```
[Answer]
# [APL (Dyalog Unicode)](https://dyalog.com), 87 80 77 67 63 bytes
thanks to H.PWiz for saving 7 bytes and ngn for another 13 17.
```
a←⎕D,⎕A⋄,⍉↓⊖(5/2)⊤↑35(≠⊆⊢)a⍳'Y.|W|X'⎕R{'0'/⍨30 36|a⍳2↑⍵.Match}⍞
```
[Try it online!](https://tio.run/##LY0xS8RAEIX7/Aq7vYPzbncnWZIyl@CeBAneYZLZLijR4kALGzF2Er1IRBEtRcTCXvxD80fihrOYee99w2PKi/XuyVW5Pj/t6fF1P6XmiTt0f1f1pbUWxRO7Qnq4nVC3oeaF2reRN5Njar@oeQZvRJsPahtqP8cldT8Mp3VeF8yWlteMsxl138B3QNXDVdoKdb/Tg/Ly@OyGuvfevuorB0TIfYNcSIiS1GHMqRwEcKFQ8zBCFYVzVdhoksRH9JPE6NTXmGs/1WZoYQ5SGEvdFeYr11K9EIhioY2Ug5HSIEQyKlTsASrwYlXYuH2VZUGwp/i/HGVCgBwkWB4aABTDWCRB8K38AQ)
NB: Takes the input as an upper case string.
[With pretty printed output](https://tio.run/##LY3BToNAEIbvPAW3LUml7G5L6KEHCkoNVmKxhcV4oAp6IK1RDhrrzWCLwWiMPRqjHnrwZnwBH2VeBJfUw8z//9/s7IRnycbxVZhMT8oaPLzsulB8SXJl3U15aPRNNJ5eitOJuBF3qp520vMoQpB/RJNwnESuvrPPA39vMHQRJimSBB62HcgeFQHmd3EZcsuRWedNh/vb@u8KibCcowPInupQLCB7hnxZazWIBPknh7RVg8Ub5Bnk71IIxTdi8syb@Yj/MLhGCmpAsaKKSNVZNSV8BYofuR@mR6c3ULwelvxwGQsU64oWMAUTatiOgJAQC4zSJvXVrm4w1dC7qs9jYNsaY5ptB5ajWcyzNMcKqi3mUYIDTpsu89wmp1YPM4Z7VkBIZQgJGDWI4atmizKVtkzV53F9ajRqt7dU5V@GI4wpqaQ92AsoZbgqjgjFylr@AA)
# Explanation
`a←⎕D,⎕A` a is the string `'0123...89ABCD...XYZ'`  
`'Y.|W|X'⎕R{'0'/⍨+/30 36|a⍳2↑⍵.Match}` replaces X W and Yx with the corresponding number of `'0'`s (explained more below)
`35(≠⊆⊢)a⍳` converts the string into vector of indecies in `a` and splits on `35` (i.e.) `'Z'` creating a nested vector  
`↑` converts the nested vector into a matrix padding ends with `0`s  
`(5/2)⊤` converts each number into a binary vector resulting in a 3-dimensional matrix with binary vectors along the primary axis  
`⊖` reverses along the primary axis  
`↓` reduces the rank of the matrix so it is 2-dimensional  
`,⍉` reshapes the result to the appropriate output
```
'Y.|W|X'⎕R{'0'/⍨30 36|a⍳2↑⍵.Match}
'Y.|W|X'⎕R                         ⍝ Regular expression replace. mathing the string.
                        2↑⍵.Match  ⍝ Takes matching string (either 'X' 'W' or 'Y.') and pads with spaces to length 2
                      a⍳           ⍝ Returns the indecies of each charactor in a. on the spaces this is 36 (length of a)
                30 36|             ⍝ Takes the remainders of the indecies when divided by 30 and 36 respectively. Overall 'W' -> 'W ' -> 32 36 -> 2 0, 'Y2' -> 'Y2' -> 34 2 -> 4 2.
           '0'/⍨                   ⍝ Make vector of repeating '0's with length equal to the sum of the result. '0'/⍨4 2 ≡ '000000'
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), ~~156~~ 142 bytes
*14 bytes saved thanks to Jo King. (Also fixed a little bug with parsing the `y` and added a prettifier.)*
*Fixed the buggy parsing of `y[wxy]`.*
```
{s:g/y(.)/000{0 x:36(~$0)}/;s:g/x/w0/;s:g/w/00/;s/$/z/;map {
.flatmap:{:32($_).fmt("%05b").flip.comb}},[Z] .split("z").map: (*~0 x.chars).comb}
```
[Try it online!](https://tio.run/##3VJLjptAEF1Pn6KESdSMEHQbmbFNPFI2kbLPKo41atvNmJjf0Dg2WJ51TpB17pKb5CJOY/wD7NEo2QWhovRe9atXRcc88e1tkMFbFwawXYv@o5lhQzMJIWsCq75l42eVaBvTKaiVuSRltpQVMjNVMzedgMWwNlyfpTLrr/tWG6sPmuEGKVbekM5YkbnvxcYkCsabjT78PAJDxL4n6VxyxSHAt8@ynzGZsURoZeXWQUhaU8X@Gyc8TTPp81Oy4A604KO7S3WQxCIJgcG@5DFh8cybMF8yEhI8TFnqRSHgXz/BZ/A@CdnCn2pGIfGB@eKkkc44BCxNvBV848lYHgsMJB2iNbrZmZH91QcH3QiWQTGJi1WhwSL0uRAHjyWN8ZHfDYlv9zFNWCiwQhQY3IMCig4KLfPfP74rsvhr5IVlxMqXUCLguVVtUAa1R3HQRod3NFtSoNmqCJkMHQvad1POuQ1kwuhdd9yzc7s3pdOeDUvLyrvzp@Rp3s3zfGVZYFFGunlGaNuazCOIOr1eJ8q56HYFz2X5PUKoVYhKt8Mh1aF4RzoMiQ7klEqUnNBKOkKtg6GdRllNS/ZUfsTo8T1p0wtwjTnvWdGW/ZuLODg51yEXpGgznk18BjfWQaviLzisrKw2bHVBtTO0TjYjqRtqyF43JBfXvC9ni7si9ZoO/wBfb9mYuHKmsiV64W@@6jL9x3Bjgy/Cf91yhND2Dw "Perl 6 – Try It Online")
The line break is there just to make the text fit on the screen. It is not a part of the program.
## How does it work
It is an anonymous function that takes a mutable string. (This makes using the function a little bit peculiar, because you can give it only variables, not literals.) After some work, it returns a list of lists containing 0's and 1's, with the same meaning as in the original post.
The input string comes in in the variable `$_`. We start by using a series of substitution statements on it in order to get rid of all of those shorthands for various numbers of zeroes. First, we need to sort out the `y`, because in the case of `yx` or `yw`, the `w` (or `x`) does not constitute a shorthand by itself. We search for `y(.)` (`y` and one character, which it remembers) and replace it by `000{"0"x:36(~$0)}`: the three zeroes are copied verbatim, then we convert the next character from base 36 to base 10 (`:36(~$0)`) and add that many more zeroes. Then, we replace the `w`'s using `s:g/w/00/`, and the `x`'s using `s:g/x/000/`. Finally, with `s/$/z/`, we add a `z` onto the end, adding a whole lot of empty lines to the bottom. (We'll see the reason later.)
The rest is just a big map statement. We're mapping over `.split("z").map: (*~0 x.chars).comb})`, which is the input string (without zero shorthands), splitted into lines at `z`, with each line being first padded with `0 x.chars` (tons of zeroes, namely as many as is the total length of the input string) on the right and then broken down into a list of individual characters (`.comb`). Finally, we transpose it with `[Z]` (reduce with zip). Zipping ends as soon as the shortest list is depleted, which results in all lines having the same length. (The number of useless trailing zeroes on the right is equal to the length of the shortest line. Also, this transposition trick fails for a "matrix" with only one row. That's why we forcibly added another row at the end before.)
Now, we just map over the rows (columns of the original matrix) and replace each character encountered with the corresponding 5 bits. That is done using `:32($_)` (base 32 to base 10) `.fmt("%05b")` (format as a bitstring of width 5, padded with zeroes) `.flip` (reverse the string, because the LSB is in the top row, not the bottom) `.comb` (break the string into a list of characters). We have used `.flatmap`, which flattens the resulting list (otherwise we would get a list of lists in each column). The transpose of the result is then implicitly returned.
(I feel a little bit bad because of abusing the possibility of trailing zeroes so hard. But it reduced the bytecount quite considerably :—).)
[Answer]
# [Retina](https://github.com/m-ender/retina/wiki/The-Language), 203 bytes
```
y(.)
#$1
{`#
0#
#0
000
)T`dl`_dl`#.
w
000
x
00
z
¶
%(`.+
$&¶$&¶$&¶$&¶$&
T`g-v`#`.+$
T`dl` `.+$
T`g-v`dl
T`89l`#`.+¶.+$
T`d` `.+¶.+$
T`89l`d
T`d`    #`.+¶.+¶.+$
T`4-7`d
T`d`  #`.+¶.+¶.+¶.+$
)T`d` # #
P`.+
```
[Try it online!](https://tio.run/##VYxRboMwEET/9xSRnFZBVZDtBWNu0Y/8F4KRUzkqSqgKu71XDpCLUUOSql1pVzPzRntuP98/ajVNtEkTEGsF35UAKUBIkFJCsqvcsXqLK1IYlmiMFxiuF3jaVOkLrJ@vl/8Lu8pvvyoR6RqWB6u7nGN3jMKWx4VfL/fOUnm4mbpbGufRe9BsW/zSv@zGkwWIlYDXyKZJ5Qi6cG3bGpBNrQq7Lw2b0ilXGhgQ2YbT@RQsM4@IgKqWlkkqjU3ooMvLMu@47a3tW451IMQMR7OvGzJNvTdjtByCJbIhsO@sp8HbzvP8ggbUimOa9TT0WUz9QRGpg2etZ6E1Eza6GY3LkQzmzozR/gA "Retina – Try It Online") Link includes test cases. Alternative solution, also 203 bytes:
```
y(.)
#$1
{`#
0#
#0
000
)T`dl`_dl`#.
w
000
x
00
z
¶
%(`.+
$&¶$&
T`g-v`#`¶.+
T`dl` `¶.+
T`g-v`dl
^.+
$&¶$&
T`89l`#`¶.+
T`d` `¶.+
T`89l`d
^.+
$&¶$&
T`d`    #`¶.+
T`4-7`d
^.+
$&¶$&
T`d`  #`¶.+
)T`d` # #
P`.+
```
[Try it online!](https://tio.run/##bY5bbsIwEEX/ZxVIpoioAtmexDi76AffrUMcGWTUCFI1mem@WAAbSx3UB5Vqydbcc48tn5u3w2ulxpGW6wzEXMGHEyAFCAlSSsi2zh/dS9piDf0NDekEhusFHpZu/QjzxfUyX8DWhdW7E@56Sex2a/Y9T4U/wvO9bMvjnfzrTtz/VVOb1o@crzb/GV99dktiJuApfW4cVYGgN75pGgOyrtTG7krDpvTKlwZ6RLbxdD5Fy8wDIqCqpGWSSmMdW2iLsixabjpru4aTDoSY42B2VU2mrnZmSJFjtEQ2Rg6tDdQH2waenqAeteJE8476Lk807BWR2gfWehq0ZsJa14PxBZLBwpshxU8 "Retina – Try It Online") Link includes test cases. Explanation:
```
y(.)
#$1
```
First handle the awkward case of the `y` command. Sadly the letter after this is allowed to be a `y` or even a `z`, so we have to be careful here. All the magic `y`s are first turned into `#`s.
```
{`#
0#
#0
000
)T`dl`_dl`#.
```
A loop then processes the `#`s. First, a `0` is prepended to the `#`. If this is a `#0` then that is changed to `000` which completes the operation, otherwise the character after the `#` is decremented and the loop repeats until all of the `#`s have been processed.
```
w
000
x
00
```
Fix up the `w`s and `x`s.
```
z
¶
```
Split on new lines. (`S`z` also works for the same byte count.)
```
%(`.+
$&¶$&¶$&¶$&¶$&
T`g-v`#`.+$
T`dl` `.+$
T`g-v`dl
T`89l`#`.+¶.+$
T`d` `.+¶.+$
T`89l`d
T`d`    #`.+¶.+¶.+$
T`4-7`d
T`d`  #`.+¶.+¶.+¶.+$
)T`d` # #
```
Make 5 copies of each line, then perform binary conversion by mapping letters with the appropriate bit to `#` and clearing that bit, while other letters become spaces. The bits are processed in the order 16, 8, 4, 2, and then the last translation handles clearing the `2` bit and converting the `1` bit at the same time. (The alternative version makes each copy individually which costs more bytes but these are saved because the bit handling is simplified.)
```
P`.+
```
Pad all the lines to the same length.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 50 bytes
```
ＵＢ0≔⁺⭆χιββＦＳ¿υ×0⁺⊟υ⌕βι≡ιz×⸿⁵y⊞υ⁴x×0³w¦00«Ｐ↓⮌⍘⌕βι²→
```
[Try it online!](https://tio.run/##XU/RaoMwFH2uXxF8iuBAEytin1bGYA@F0u5xLzGmMeiMmFhNRr/dRTtWtkDgnnPvOedeWpGeStLM85npPaE17@XQltCP/GDnPSsleAuPzaDgWfei5QfSwTgKgQhCUKx/511kD@Bb2w36PgODAIgLgEMAjg5r@C4@mVosQ7BaHWXnmiF4FS6pWMzc23msUQyoUWhaASgC8OVR4hjf@vlfo4/eOW0XyX3ALAODquAQguSXnf7Llnz8UI2/fT9ary3ZhQyNzl3w5uAK0a3d/EWObQhO7Mp6xeDeiX/ufOwfArSesDnIK4P5SfBKO3jzbvNsME7wlBaEmpSSIp0ctHWdGZPVteUy42bkmeQ2ihE2I0axdWyizKgSx/IqNiauuEVoKRCyBlNEp7TcYpPibZlODs5P1@Yb "Charcoal – Try It Online") Link is to verbose version of code. Uses `1` and `0`. Explanation:
```
ＵＢ0
```
Set the background, i.e. any unprinted cells of the rectangle enclosing the output, to `0`.
```
≔⁺⭆χιββ
```
Prefix the digits to the predefined lower case alphabet.
```
ＦＳ
```
Loop over the input string.
```
¿υ
```
If the predefined empty list is not empty...
```
×0⁺⊟υ⌕βι
```
... then print a number of `0`s given by the sum of the number popped from the list and the index of the current character in the digits and letters. See below for what that number always is.
```
≡ι
```
Switch over the current character.
```
z×⸿⁵
```
If it's a `z` then output 5 carriage returns, taking us to the next output strip.
```
y⊞υ⁴
```
If it's a `y`, then push `4` to the predefined empty list, causing `4+n` `0`s to be output next time.
```
x×0³
```
If it's an `x` then output 3 `0`s. (This is done via repetition to avoid the literal `0` touching the `x` or the following literal.)
```
w¦00
```
If it's a `w` then output 2 `0`s. (The `¦` is needed to separate the two string literals.)
```
«Ｐ↓⮌⍘⌕βι²→
```
Otherwise, index the current character in the digits and letters, convert to binary, and print the result downwards least significant bit first; then move the cursor right for the next column.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 66 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
Yowza!
```
ØBiⱮ+
Œuœṣ⁾YYj38Żṣ”YµḢç3;)Fṣ”Wj2ṣ”Xj3”0ẋ$¹OƑ?€Fṣ”Zµȯ”0ç31BḊ€UZ)Ẏz0
```
A monadic link which yields a transposed version as a list of lists (add `Z` to the end to transpose back).
**[Try it online!](https://tio.run/##y0rNyan8///wDKfMRxvXaXMdnVR6dPLDnYsfNe6LjMwytji6G8RpmBt5aOvDHYsOLze21nSDiIRnGUEYEVnGQNLg4a5ulUM7/Y9NtH/UtAaqJurQ1hPrQZJAjYZOD3d0AaVCozQf7uqrMvj//79SubFxlUV2YVFhtkVVVVWFsbESAA "Jelly – Try It Online")** Or see the [test-suite](https://tio.run/##LY6/SsNQFMb3PoWELqUdcu9Jbm9wEDq4OommW5qE1NxCqEGSeyZ1KagI6qCLiw4uoji09A84JER8jfRF4k3rcA7f9zvfOZzQH41kVeVPvZP110e7UdyfFQ/l4nV98W3bIfBiVZvzZzublvOX/A12W/tbchTSrTgOQXW9XF43s8XBz93e@vL9P9PPpr@f9VAtkl45v1Kjw36rXN6iXuWTfv5oGdRsEw7l6sZudPJJUyVsVaF6IJtls6rSiAlaZ0ejXc/3fVZL3XVIlw8shszyiGdtYAKAXIxPx4IjYgqbJSCOzlHqhIIroppEpmWZEfox57GPyTYmAQxI2cBxJXOdAUuVRSG4lFwIDCIeyCTgUYD1IZkAJaioEcskNhQNhkRKMgyQ0lpQihJc6qbMM0EyMD2WKqv9AQ "Jelly – Try It Online") (with pretty printed output).
[Answer]
# [Python 2](https://docs.python.org/2/), ~~249~~ 244 bytes
```
def f(s,Z='0'):
 while'y'in s:i=s.find('y');s=s[:i]+4*Z+Z*int(s[i+1],36)+s[i+2:]
 t=s.replace('w',2*Z).replace('x',3*Z).split('z');return map(''.join,zip(*[[(Z*5+bin(int(c,32))[2:])[:-6:-1]for c in r]+[Z*5]*(max(map(len,t))-len(r))for r in t]))
```
[Try it online!](https://tio.run/##ZVDLbsIwEDyXr/DNu4lBOIG0ScWVj4jrQ8hDuAomsl0g@fnU5qEe6svOrGZmdz2M7njWyTw3bUc6sKzc0TXFYkGuR9W3dKRKE1uonV11SjfgG/hpd1YUSsabqIzLSGkHVqiYS5ZmGAeYFHJBnPeYduirugV6pSyJSvxr3ChLQ8MOvXJAJx9rWvdjNDlVA1C6@j4rzSY1QCQElNE2PigNYVbN0gRR@BkoimVWLLnszobUxG9qZCy8VkZwqm4QkvpWM4e49BUMYlCaoHQS8X70Hqw/920wPpvYJ3hx/yP4wvRLP7aCfxsGmX8v82IPlG9TineQTGmWP/BlrPg0XTwJbF1X/P3jkGdTlje8ybOnYbxxivP8Cw "Python 2 – Try It Online")
5 bytes saved by [Jonathan Frech](https://codegolf.stackexchange.com/users/73111/jonathan-frech).
[Answer]
# JavaScript (ES8), 192 bytes
```
s=>[...s,"z"].map(c=>{h=parseInt(c,36);k="wxy".search(c)+1;y?k=h-y--:h-35?y=h>33:m=m.map(P,z+=5,i=k--);for(h=k?0:h;~k--;m[i]=h.toString(2)+P(m[i++]||""));},P=d=>d.padStart(z,0),m=[i=z=y=0])&&m
```
Returns the transpose... which is then reflected across the vertical axis; let me
know if that invalidates this entry. Output is an array of strings containing
`0`s and `1`s.
[Try it online!](https://tio.run/##7VpLj9o6FN7zKywWJREhE5OBhkGZURd3cXcj9e4oUj2OSdJAwthmiNP2ru/2bvoD@0fmOoHySgLRjO6AqqAImWOfcz5/55EXX9ATYpj6c94JI4c8E/uZ2bcjXdeZ1kyaY32G5gq2b7969hxRRv4MuYI1s68OA7u5jEVTZwRR7ClYbcOhuAtsryM6nRuvY/buhO3dmubNzJ5lZu61pG33NN8OOh11OImo4tnBnXHjDf@WkuFs5I9tT@fRR0790FW6avtekcJ2e/ztW7OpqsPv2r3t2LeOPkfOR44oVxLNULWZPfLtxBa2MVbfvZs9X12BDw@MhJiAaAIQY4RyPwoBoTSiDPih42PECQNsgTFhrIGjkHHAgQ0oeVz4lCitlVZLHTYa0tw9JZyLzlzi4hLaWmEiFWJg3wIFyRFRYlUD6Uw0Jfo0chWU7ZqmK6hOyXyKMFGujCtXA62fP/5pqVshXAv/bamq/iXyw8@fws9S8ilsSaNoDeMvFEjU3COAUxSyecSIJiFPpgRzBqInQrPJp3S/GE0Bin0mtUMHsIxSf@Kv9Wm0ZKlFHq1MyWDMgOs/kRBIYjjAiBHWAiSeS9PEkU7YYspT7qQGAulyxDNLWGYNiBZ8vuCsAeRnxY37i5uvmXA7IekAHyhFQolHxlifktDlnqpP/OlUkUEebpbHGXsitSGyoQw28NWMTZkp0kwC2tlQ3dGSgVrQENCV5Puat82WMinXHULmfzwu0FSZKC3YM1OSXWVjJP2MRlAD6THWwMjQgLEdSqmxle4Nx3s2UmC7CSHzqvte@iZ9GeYiKJvZAjgrx3DlaOt5I4ObYwsTFogPZnbh79nOb6UAsIERfG89DPpJf@BAZ1AKfdexUeAb5r932N4R50IB940f2dJeuA7Y2Wf0QAceTua/jUNAObPlgCoxvTTNxAoe6WNgJUkSm@YRpkt8V4H0CnG5yxxFezp7tMKC8FdK199YnGPwqPjFLiuloQmRYSXCgF0TB9GRvllefDBXzUa1QiltGC/RL7ZSoF@tkE91nv2kLjVRLQhRbzDoRQlhlsVIsizvBScrp6jHHtbjL9wHXMMye0XrDvv0VlZ02trHUp7txyugsqwS58I0r824/4Cw6GP00I/lzyQILCGsIEjcyHLF0rUiN0lLQyzNLkyk9JqJJbuWUteDQkDPTbrddNDtJsLEXRz3nZ4p@mbP6cfy5/Gz57HEPVJT5el20mCFrM83dFgZSH7xS3tDGRGwMgtVqTzVYU7t8DXLXori/zpqFCXX4mc5ctf4Z4FwiVzU2XlRKOD5shMW3DW/fYHkrnbOhaLs5vAtw1HXSI2iRlGjqFG8EsUFdPALOJtd0pn93Fc5dY3Ud4j1HWJ9h/i7ojjH07ULeNJ4GU9dL@MJ9Ntm57jRyL0rWL8sSP9hgfn2dYFoqes/N2jAtDbvFA6XJbvLBnLZ838 "JavaScript (Node.js) – Try It Online")
## Explanation
For each character `c`, `k+1` evaluates to the number of rows to modify. 
`k = "wxy".search(c) + 1;`, where the `search` method returns the index or `-1`.
`k` is then decremented until it reaches `-1` by checking `~k--` for a truthy
value.
If the current character is "y", set a flag so that the base-36 value of the next character - 1 becomes the value for `k`.
Upon encountering a "z", pad strings to the left, increment the pad amount by `5`,
and reset the array index to `0`.
```
s =>
    [...s, "z"].map(c => {                  // append a "z" to ensure final output is properly padded
        h = parseInt(c, 36);
        k = "wxy".search(c) + 1;            // note that "y" -> 4 zeroes
        y                                   // if previous char is "y"...
            ? k = h - y--                   //      decrement y after subtracting y=1 since k is decremented to -1 and the previous y already pushed 4 zeroes
        : h - 35                            // else if current char is not "z"...
            ? y = h > 33                    //      set y if current char = "y"
        : m = m.map(P, z += 5, i = k--);    // else if current char is "z", pad
        for (
            h = k ? 0 : h;                  // if k is truthy, push zeroes
            ~k--;
            m[i] = h.toString(2)            // convert to boolean representation
                + P(m[i++] || "")           // prepend to row or to a newly padded row
        );
    },
        P = d => d.padStart(z, 0),
        m = [i = z = y = 0]                 // the logical OR 4 lines above replaces this value with ""
    ) &&
    m
```
[Answer]
# Haskell, 399 bytes
Install `split` package: `cabal install split`
```
import Data.Char
import Data.List.Split
import Data.List
p=map
r=replicate
a c|47<c&&c<58=c-48|96<c&&c<123=c-87
o=a.ord
m l n|l==0=[]|True=(mod n 2):m(l-1)(div n 2)
t a=p(\l->l++r((maximum$p length a)-length l)'0')a
y s|length s==0=""|h=='y'=(r(4+(o$s!!1))'0')++y(drop 2 s)|h=='w'="00"++y t|h=='x'="000"++y t|True=h:y t where h=head s;t=tail s
w=(p concat).transpose.(p$p$(m 5).o).t.(splitOn "z").y
```
]