def conv_32upto64(val, nb):
    """ converts val (32bits) to 32+n bits (n must be comprised between 0 & 32 bits)
    :warning: conversion output shall not exceed 32bits (input shall strictly be unsigned 32bits)
    :warning: nb shall be in range 0-32 (note that using 0 doesn't change val)
    :param val: 32bit var to convert
    :param nb: nb of bit pseudo shifts to add
    :return: 32+n bit conversion result """
    return (val << nb) + (val & 4294967295 >> 32 - nb) & 18446744073709551615
