from typing import Optional


def erd_encode_bool(value: Optional[bool]) -> str:
    """ Encodes a raw value to a bool, None is encoded as FF """
    if value is None:
        return "FF"
    return "01" if value else "00"