I had looked up C++ operators but found nothing. FTR: A search for C operators shows '~' to be a bitwise 'NOT' which is defined thus:
The bitwise NOT, or complement, is a unary operation that performs logical negation on each bit, forming the ones' complement of the given binary value. Bits that are 0 become 1, and those that are 1 become 0. For example: NOT 0111 (decimal 7)
= 1000 (decimal 8)*
In this context, then, it matters not whether it is used or not. All it does is vary the bit patterns sent ro the matrix.
vagulus:
I had looked up C++ operators but found nothing. FTR: A search for C operators shows '~' to be a bitwise 'NOT'
If you'd looked in the Arduino language reference (top of the page under "Learning") you'd have found something very similar. Being rather new to all this myself I find that a rather useful starting point for understanding things in Arduino programs.
vagulus:
How does tilde turn one byte into four bytes?
It doesn't.
There is no println for byte-sized values. The smallest integer size supported by println is long. The complemented value is sign extended to a long before the call to println.