Quote:1) I din't understand why always "and" operation is done only with 0xF.
Such operation masks out (discards) the
most significant bits of the byte, because
in binary representation. (e.g.
10101001 & 00001111 = 00001001
Quote:2) In tohexString(), why ">>" operation with 4 is done?
This 'moves the right nibble to the left', that is the
most significant bits of the byte replace the
least significant ones (the right shift operator
moves bits to the right). Hence, for instance,