Since we're only dealing with short
this works out as a simple mapping to standard hex notation. We can reverse it like this:
Public Function StrToShort(bcd As String) As Short
bcd = bcd.Replace(":", "A").Replace(";", "B").Replace("<", "C").Replace("=","D").Replace(">", "E").Replace("?", "F")
Return Convert.ToInt16(bcd, 16)
End Function
Technically I could even combine those two statements and make this method a one-liner.
See it here for every possible input up to the limit of fiddle:
https://dotnetfiddle.net/bvmdKC
We can also simplify the original code like so:
Public Function ShortToHexStr(input As Short) As String
Return input.ToString("X").
Replace("A", ":").
Replace("B", ";").
Replace("C", "<").
Replace("D", "=").
Replace("E", ">").
Replace("F", "?").
PadLeft( 4, "0"c)
End Function