$a*b=|a-b|$ a,b belongs to Z+
I'm trying to find that it's a binary operation or not.
So I check associativity As Take 1, 2,3
1*(2*3)=1*|2-3|=1*1=|1-1|=0
(1*2)*3=|1-2|*3=1*3=|1-3|=2
Not equal
Also If a=b a*b=|a-a|=0 not in Z+
I conclude that * is not a binary operation
Is my approach right. Or not.
I am going to turn the comments into a community wiki answer.
A binary operation just takes two numbers of a set and returns a number of the same set. Associativity is not required. We accept subtraction on the integers as an operation, but $(a-b)-c \neq a-(b-c)$. In your case if $a=b, a*b=0$, which is not a member of $\Bbb Z^+$, so it is not an operation.