Added common utility, convert int to endians