or pooling (often used in DNN). Consequently, in the definition of the basic function of BDNN, we also defined both the linear and nonlinear calculations.

First, since the BDNN is created by binary values, the basic calculation should be chosen from Boolean algebra. The Boolean binary operations are “and $\wedge$”, “or $\vee$” and several derived operations (“exclusive or $\oplus$”, “equivalence $\equiv$”, “material implication $\rightarrow$”). The truth table of those operations is shown in Table \[truthtable\]. Obviously, the “exclusive or” and “equivalence” should be chosen because their results are balanced between “0” and “1”. In BDNN, we chose the “equivalence” as the linear calculation. If we use $-1$ to represent “0” and $1$ to represent “1”, then the result of “equivalence” is equal to the multiplication of real number. For convenience, from here we will treat the binary values as real numbers and use the corresponding real number operation instead of the Boolean operation (just like the “equivalence” to multiplication). As shown in Fig. \[ANNbasic\], assume that $\bm{\vec x}=(x_1,x_2,...,x_n)$ are the input neurons of BDNN and $\bm{\vec w}=(w_1,w_2,...,w_n)$ are the corresponding weights, $y$ is the output neuron, then we have $x_i,w_i,y \in \{-1,1\}$. As mentioned above, the linear calculation of BDNN 