since in the results, there are two “$1$” and one “$-1$”, thus the value of output $y$ is “$1$”. Please note that although is written as real number function, it denotes the Boolean operation of “equivalence” and a counting operation. With , the forward propagation of BDNN can be realized. For a certain set of input binary data, the BDNN can calculate its corresponding output, which is also binary.

![The calculation of BDNN basic function $f$. \[BDNNexample\]](BDNNexample.eps){width="30.00000%"}

The hybrid-BDNN
---------------

Clearly, the BDNN introduced above is only able to process binary input data. If the input data is non-binary, such as grayscale image, the BDNN can not be used directly. Therefore, we should first convert the non-binary data into binary before the BDNN is used. For such situation, we proposed the hybrid-BDNN, which is a combination of conventional neural network and BDNN.

As shown in Fig. \[HybridBDNN\], the Hybrid-BDNN contains three parts: the normal neural network part, the transition part and the BDNN part. The lower layers of hybrid-BDNN are normal neural network part, which is connected to the input data (binary or non-binary); the higher layers are the BDNN part, which generates the result. The transition part is a 