First of all, yes this is a homework question however I am not asking you to do it for me I just need something clarified :)

My homework is create a truth table for:

Q = NOT (X OR Y) AND Z

Now, is the 'AND Z' also included in the NOT?

If that didn't make sense, X OR Y is basically, if !X OR Y... right? But is it also NOT Z or does Z need to be true?

For example would it be:

X   Y   Z   X OR Y  Q

0   0   1       0   1



OR

X   Y   Z   X OR Y  Q

0   0   1       0   0

In general, boolean logic precedence rules place NOT first, then AND, then OR. So in your example, it would go like this:

(NOT (X OR Y)) AND Z

Or broken down using temporaries:

A = X OR Y
B = NOT A
C = B AND Z
Q = C
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.