def to_tri_state(value: int) -> str:
  """Parses an integer value to a tri-state code

  :param      value:  The value to parse
  :type       value:  int

  :returns:   A string containing the tri-state code
  :rtype:     str
  """
  tri_state = ""
  string = "{:024b}".format(value)

  for i in range(0, len(string), 2):
    if string[i:i+2] == '01':
      tri_state += 'F';

    elif string[i:i+2] == '11':
      tri_state += '1';

    elif string[i:i+2] == '00':
      tri_state += '0';

    # would result in an invalid string arccording to the arduino library but
    # for completeness sake
    elif string[i:i+2] == '10':
      tri_state += 'S';

  return tri_state