The byte data type is an 8-bit numerical value that ranges from 0 to 255. The following shows how we would declare a variable of the byte type:
byte myByte = 128;
The preceding code declares a variable named myByte of the byte type with an initial value of 128.