ELI5: Explain Like I'm 5

Binary function

A binary function is sort of like a rule book that tells you what to do with two things you give it, and it only gives you one answer. It's called "binary" because it works with two things at a time (kind of like how a bicycle has two wheels).

Here's an example: imagine you have a cookie jar with different kinds of cookies inside. You want to know how many chocolate chip cookies and how many oatmeal raisin cookies are in the jar. You could use a binary function to figure this out: you give the function the number of chocolate chip cookies and the number of oatmeal raisin cookies, and it gives you the total number of cookies in the jar.

What the binary function does is take the two inputs (in this case, the number of chocolate chip cookies and the number of oatmeal raisin cookies) and follows its rule book to give you the output (in this case, the total number of cookies). It's kind of like a recipe that tells you what to do with certain ingredients to make a certain dish.

There are other kinds of binary functions too, like ones that take two numbers and add them together, or ones that take two strings (like "apple" and "orange") and concatenate, or put them together, to make one string ("appleorange"). But no matter the function or the inputs you give it, there will always be one and only one output.
Related topics others have asked about: