I wonder what the bitsize of the arduino uno is. I want to use a delay of 30 minutes in my arduino code but i dont know if i can store the number 30x60x1000 = 1800000. I have it stored as an unsigned long. So what would the largest unsigned long be?
unsigned long on Arduino is 32 bits: 0 to 4,294,967,295
2^32 - 1 = 4,294,967,295
232 - 1
Okay but is arduino 8 bit? that is what i read on here: Arduino Uno Rev3 — Arduino Official Store
I dont fully understand bitsizes. I thought that if it was 8 bit, then the largest number would be 8 bits which would be 2^8. But that seems to be wrong
Yes, the processor has eight bit RAM data paths
Yes. You have 10 fingers and that doesn't stop you from counting up to the number you want, right?
4 bytes = 32 bits.
aaaahhh okay that analogy is actually good! i see then... Thanks
Have a look at Arduino data types reference.
Among them there are data types of 8 bits (byte), 16 bits (int) and 32 bits (long).
There are signed and unsigned data types.
You can choose the data type that suits you.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.