def _temperature(temperature_register, farenheight=False):
    """Return the temperature in Celsius given the raw temperature register value.

    If farenheight is True, return the temperature in Farenheight.
    """
    temp = (0xFF & (temperature_register >> 8)) + ((0x7 & (temperature_register >> 5)) / 8.0)
    if farenheight:
        temp = (((9 * temp) / 5.0) + 32)
    return temp