In order to make an expression for any truth table, you gotta have your truth table out first. This is the one we’re going to use as an example:
The first step is to choose if you want to express all the false outputs or true outputs. Each false or true output means one expression that we have to make. For our table above we’ll choose true. That means we only have to make two expressions
Next step is using the “and” operator to make an expression for each true row. Your working expression has to return the value true when you plug in the two inputs of that row. For our example, I’ll do row two: and(x,not(y)). This returns the value true.
Next step is if we made more than one expression, we gotta combine them with the “or” operator. This will give us a working expression for the whole table. For our table above, I made the two expressions and(x,not(y)) & and(not(x),y). Them combined looks like this: or(and(x,not(y)), and(not(x),y).
The last step is to check if the expression is correct. Go through the truth table and plug in the inputs of each row. If you get the same outputs as the table then your expression is correct.
edit: for “or(and(x,not(y)), and(not(x),y)” im missing one more paranthesis at the end of the expression. Should look like this: or(and(x,not(y)), and(not(x),y))