A Design of Digital Hardware Archtecture for Pattern Recognition