Hex to Binary, Binary to Hex
$ A2F = % 1010 0010 1111$ 345 = % 0011 0100 0101
Binary to Hex is just the opposite, create groups of 4 bits starting with least significant bits. If last group does not have 4 bits, then pad with zeros for unsigned numbers.% 1010001 = % 0101 0001 = $ 51