public static function fromHex($hex)
  {
    if(strlen($hex) != 2)
    {
      throw new Exception("given parameter '" . $hex . "' is not a valid hexadecimal number");
    }

    return new self(chr(hexdec($hex)));
  }