def de_irig(val, base_shift=0):
    """Converts the IRIG signal into sec/min/hours/day/year depending on the parameters

    Parameters
    ----------
    val : int
       raw IRIG bit info of each 100msec chunk
    base_shift : int, optional
       number of bit shifts. This should be 0 except for seccods

    Returns
    -------
    int
       Either of sec/min/hourds/day/year

    """
    return (((val >> (0+base_shift)) & 1)
            + ((val >> (1+base_shift)) & 1) * 2
            + ((val >> (2+base_shift)) & 1) * 4
            + ((val >> (3+base_shift)) & 1) * 8
            + ((val >> (5+base_shift)) & 1) * 10
            + ((val >> (6+base_shift)) & 1) * 20
            + ((val >> (7+base_shift)) & 1) * 40
            + ((val >> (8+base_shift)) & 1) * 80)