About Bytes
A byte is an integral type of eight bits and is the smallest addressable numeric unit of storage.
The byte data type does not support literals. As such, one can use integer literal and type cast them to byte using the (byte) type cast operator as long as the value of the integer literal does not exceed the capacity of a byte.
-
The integral types are byte, short, int, and long, whose values are 8-bit, 16-bit, 32-bit and 64-bit signed two's-complement integers, respectively, and char, whose values are 16-bit unsigned integers representing UTF-16 code units.
-
The floating-point types are float, whose values include the 32-bit IEEE 754 floating-point numbers, and double, whose values include the 64-bit IEEE 754 floating-point numbers.
You can convert a byte to a string and a string to a byte.
For examples of how you can use bytes, see Example Simple Expression Use the Byte Data Type and Byte tab Syntax Buttons.