The legal chess pieces in Chess are 8 pawns, 2 knights, 2 rooks, 2 bishops, 1 queen and 1 king.
Board is made of 64 squares and if move is possible then Knight can move currentSquare + one of the possible move.
Possible Move = {-17,-15,-10,-6, 6, 10, 15, 17}
The cases where it is not possible is either there is a friendly piece or that square is out of bounds. For example, 3-17 doesn't make any sense.
Visual -
Knight Image - Expert Chess