Solidity Programming Language – Bytes Fixed Sized Array
1 byte = 8 bit
1 hexadecimal = 4 bit
1 byte = 2 hex
Everything that will be stored in the byte array will be in the form of the hexadecimal digits.
In Solidity, you can use a fixed-size array of bytes, denoted by bytesN
where N
is the size of the array.
Details:
1) Byte arrays cannot be modified.
2) Padding of 0 is added at the end if the value (by which the array is initialized) does not occupy the entire space.
Code: