this method is a little more advanced as we have been heading from an increased base to some reduced foundation. let's say the number we wish to convert from decimal to hex is X.
For a far more elaborate addition https://superseoplus.com/hex-calculator