Its a matter of adding and then dividing -
Add the 'worth' of each unit together - Pass = 4, Credit = 5, Distinction = 6, HD = 7. Then divide by the number of units.
Eg - i did 3 units this semester and got 2 Ds and a C.
So i would be (6 + 6 + 5)÷ 3 = 5.67
Does that make sense?