An unsigned integer data type representing a single byte of data (equivalent to C 'unsigned char' and expected to be equivalent to C99 'uint8_t'). A byte can range from 0 to 255. Often used to allocate and address memory.
Usage
Used in the declaration section of code, which is before any statements.
Example
byte a = 3; // binary form: 00000011 byte b = 6; // binary form: 00000110 byte c; c = a & b; // c will be 2 (00000010) c = a | b; // c will be 7 (00000111) c = a ^ b; // c will be 5 (00000101) c = ~b; // c will be 249(11111001)
Remarks
Unlike other languages the byte data type is actually a class.