This actually works as well even for `i8`:
```
bits = name[1..2].to_i
```

Also, what happens when you try to match `i51`? I think your current code returns a `nil` which is probably not what you want.