Function output difference

#1
I have two 'unknown' functions that I need to test the check if there is any difference in their outputs.

In the easiest case the output is boolean (TRUE/FALSE). How do I link the output results with sample size to know at what level of significance I can say that they are different?

Example:

Function A is simulated 100 times and has 60% TRUE outcomes
Function B is simulated 100 times and has 40% TRUE outcomes

How do I know at what level of significance I can say they are different?

In the more advance case they have a integer outcome, how do I then use the mean and standard deviation (distribution can be assumed to be of normal shape) of the outcomes to see at what signifance they are different?

If it helps, the sample size will always be the same for both functions.

Thanks in advance for any answers!