eeprom problem

for arduino uno i’m expecting output as 91083041 but getting 91017505 as output.if i’m removing EEPROM.write(addr,8); from program i’m getting correct output why this happen?

#include <EEPROM.h>
unsigned long int a;
int addr=0;
byte val;
void setup()
    EEPROM.write(addr, 1); addr++;
    EEPROM.write(addr, 4); addr++;
    EEPROM.write(addr, 0); addr++;
    EEPROM.write(addr, 3); addr++;
    EEPROM.write(addr, 8); addr++;
    EEPROM.write(addr, 0); addr++;
    EEPROM.write(addr, 1); addr++;
    EEPROM.write(addr, 9); addr++;
void loop()

This is always giving problem.

Try making all the multiplies in you calculation into unsigned longs to force the calculation to return an unsigned long value

  a = * 1UL + * 10UL + * 100UL + * 1000UL + * 10000UL + * 100000UL + * 1000000UL + * 10000000UL;

Thank you so much

it is working fine now.
why this is so?

why this is so?

I think that without the type specifiers in the constants the calculation is done as if everything was an int despite you declaring a as an unsigned long. In practice you probably only need to make one of the constants an UL to force the result of the calculation to be an unsigned long.