Helper function to print hex and decimal values