I'm a real PbPro Maths dunce and am asking for members advice on converting the following maths
routines into code.

Baiscally i have a byte array of hex data BD[11] recieved via a serial interface. I'm happy with this and the data recd.

Now taking bytes from array BD [4] and BD [5] as an example i need to perform the following calcu
lation on the bytes.

(Multiply 1st number by 128, add result to 2nd number, take off 2048, divide the result by 20.48)
I appreciate the decimal point will cause an issue. Any examples of code that would perform this.

I came up with

Code:
Result = (((BD[4] * 128) + BD[5]) - 2048) / 20
But this losses the accuracy of the end part of the formula?

Also for a second formula involving BD [2] & BD [3] I need to

(Multiply the right hand digit of 1st hex number by 128, add result to 2nd number)
I'm stuck on extracting a value for the right hand digit of the hex number?