TCP sensor setup , hexadecimal value

hi, i am intested in the TCP binary sensor to retrieve a value from my system

i need to send some kind of hexadecmial value, to get back the status 00 or 01

based on this :

payload: "r State\n"

does this needs to be changed to : payload: "00454485FAB12" 
?

basicly what i need to acomplisch

i need to send in
hex : ed 63 30 00 00 00 00 00 00 00 00 00 00 00 af af 41 00
or
asccii : \edc0\00\00\00\00\00\00\00\00\00\00\00\af\afA\00

output status will be :

hex : 01
or
ascii : \01

how to setup this in TCP Binary sensor?

thnx