Yes, X NAND 1
is like X NAND Y
with Y
fixed as 1. The thing you're comparing X with doesn't have to be called Y; it can be any variable, any constant or the result of another comparison. All that matters is whether the value is a 0 or a 1, in the end.
Example:
X | Y | 1 | X OR Y
---+---+---+--------
0 | 0 | 1 | 0
0 | 1 | 1 | 1
1 | 0 | 1 | 1
1 | 1 | 1 | 1
Now you could do X AND Y
, X AND 1
or X AND (X OR Y)
just by comparing the numbers in the first column with numbers in the second, third or fourth columns, respectively.
As for NAND
specifically, just remember that it means the opposite of AND
. It actually stands for "not and." So if you AND
ed two things together and got 0, then NAND
ing the same two things together would give you 1.
That said, your last question doesn't make much sense. There's no such thing as X+Y = NAND
. X
, Y
and X+Y
are values; NAND
is a gate. You can't compare numbers to gates. Your question is asking you to use NAND
gates to compare things over and over until you you get a column of zeroes and ones that looks the same as X+Y
does.
EDIT:
Okay, let's look at your question "using a truth table how is X' = X NAND 1?"
X | X' | 1 | X AND 1 | X NAND 1 is the same as the opposite of X AND 1
---+----+---+-------------+-------------------------------------------------
0 | 1 | 1 | 0 AND 1 = 0 | 1 (opposite of 0)
0 | 1 | 1 | 0 AND 1 = 0 | 1 (opposite of 0)
1 | 0 | 1 | 1 AND 1 = 1 | 0 (opposite of 1)
1 | 0 | 1 | 1 AND 1 = 1 | 0 (opposite of 1)
And looking at each column, we can see that X'
has the same values as X NAND 1