U & L formatters

By default, an integer constant is treated as an int with the attendant limitations in values. To specify an integer constant with another data type, follow it with: a 'u' or 'U' to force the constant into an unsigned data format. Example: 33u

int a=33u is that mean mean unsigned integer

int a=33u is that mean mean unsigned integer

Yes. The value 33u will be treated as an unsigned int. Silly to store that in a signed int, then.

is byte data type only for binary representation

which of the following is correct byte a=B1001; or byte a=65;

is byte data type only for binary representation

The Arduino (and all other computers) only knows how to store data in binary. The compiler is responsible for converting decimal, octal, binary, hexadecimal, etc. representations to binary. So, the answer to your question is no.

which of the following is correct

Both are correct.

which of the following is correct byte a=B1001; or byte a=65;

In Arduino-world, both are correct (though obviously not equivalent), but only the latter is portable.

``````byte a=B1001;
``````

is best avoided, since you can use

``````byte a=0b1001;
``````

which isn't Arduino-specific and allows modifiers like

``````byte a=0b1001U;
``````

Don't write a long modifier as 'l', always use 'L' since it otherwise is readily confused with a one. Consider 1111l and 1111L