write numbers as big endian