Q:

How these matrices are working?

I am reading a article about pattern reconigation. I am not understanding how this 8 column coming from. and how its output is generating.
I tried to get the concept but i am not getting how first matrix have 8 column  ? and how its calculating output ?

The network of figure 1 is trained to recognise the patterns T and H.
  The associated patterns are all black and all white respectively as
  shown below.
  If we represent black squares with 0 and white squares with 1 then the
  truth tables for the 3 neurones after generalisation are;

enter image description here

A:

Each table represents one line of you image.
Each column(Xij) of your table represents possible combinations of those pixels in one line(of your input image) and OUT represents if those combinations evaluate to true or false.
There are 8 columns because there are 8 possibilities of combining 3 values of 1 and 0 (2 at the power of 3).
I think it's easier if you look at those tables on vertical(transpose).

