There's just one thing missing: State which version of Prime you are using. Otherwise you run a higher risk getting an answer in a newer version of Prime, and you cannot open the file.
Anyway, you're using Prime 8.
Now to your problem.
You have defined P, Q and R to be arrays of 1 row and 24 columns. No problem with that.
But in your AND function you multiply the arguments. If you multiply two arrays, vector and matrix rules apply. For two vectors (arrays with n rows and 1 column) this happens:

You don't get a vector as result, but a scalar.
For two arrays like you have, you get:

an error message, stating that the array dimensions do not match.
What Prime might have expected is this:

or this:

Now how do you get the array elements to be operated on (multiplied, in your AND case) element by element? That is done by using the vectorise operator. You place an arrow over the expression to have it vectorised, Like this:

You find the vectorise operator at the bottom right of the operators panel of Prime.
Go ahead and play with it, and come back if you have more questions.
Success!
Luc