```
in <- (RA)[XLEN-8:XLEN-1] # extract first byte
- if XLEN = 8 then RT <- in[7]] * 8 # 1->8
- if XLEN = 16 then RT <- in[6]] * 15 || in[7] # 2->16
- if XLEN = 32 then RT <- in[4]] * 29 || in[5:7] # 4->32
- if XLEN = 64 then RT <- in[0]] * 56 || in[1:7] # 8->64
+ if XLEN = 8 then RT <- in[7] * 8 # 1->8
+ if XLEN = 16 then RT <- in[6] * 15 || in[7] # 2->16
+ if XLEN = 32 then RT <- in[4] * 29 || in[5:7] # 4->32
+ if XLEN = 64 then RT <- in[0] * 56 || in[1:7] # 8->64
```
And `extsh` and `extsw` follow similar logic. Interestingly there is