I'am trying to learn about bytes in solidity but it is really confusing. I played around with bytes in remix but one thing in particular is very confusing.
When I tried to assign number 2 to bytes1 like this:
bytes1 public num = 2;
It returned an error.
But when I tried to store 0xb5 like this:
bytes1 public num = 0xb5;
There was no error. I don't have a computer science backround so this may be a trivial question but not for me lol.
Thanks