The indicator function (or characteristic function) is defined as
$F_{t^*}:\mathbb{Z}_q\to \mathbb{Z}_q$ satisying that 
$f_{t^*}(t)=1$ if $t^*=t$ and $f_{t^*}(t)=0$, otherwise. (Here $t^*\in \mathbb{Z}_q$ is given to define the function.) 
I am dealing with transforming the function into an arithmetic cirtuit with addition gates and multiplication gates.
I know that if $t^*, t\in \{0,1\}$ then we can use a single NAND gate (in  Boolean Algebra) for this equation. 

Could you please help me about this?
Thank you very much!