Your rules of what to do are vague.
And I don't think you mean "...and subtract FROM the remaining 4th number."
I think you don't mean for the word "from" to be in there.
You're talking about "digits," not "numbers."
The following sentence doesn't make sense and/or is redundant:
"All four numbers [read: digits] cannot be [the] same[.] and not all can be zero[.]"
A zero *is* already included in the first part of the sentence.
Supposedly these would be examples of yours:
4321 ----> 4 + 3 + 2 + 1 = 10
0505 ----> 0 + 5 + 0 + 5 = 10
8642 ----> (8 X 6)/4 - 2 = 48/4 - 2 = 12 - 2 = 10