30 have opposite polarities that is the programming signals of m 2 30 uses the current prototype pattern when diff j u2212 1 or its element wise negated version when diff j 1 note that the mapping method uses m 1 20 and m 2 30 to represent the positive and negative terms of the bsb weight matrix respectively however the proposed training scheme operated in real design circumstance cannot and does not have to guarantee an identical mapping to software generated matrix defined in 11 in fact what matters most is the overall effect of m 1 20 and m 2 30 not exact memristance values 10 in each individual crossbar array step 6 if training is completed the st updates the training progress 150 if a prototype pattern goes through steps 2 5 and reports no error without further tuning m 1 and m 2 otherwise st resets the training progress 140 whenever an error is detected and all of the patterns in b n are available in step 2 when st 80 indicates that the entire training set has been successfully u201c learned u201d the training progress terminates running the bsb recall circuit 160 see fig2 under the ideal condition should obtain the same results as the mathematical algorithm unfortunately the noise induced by process variations and signal fluctuations.