binary to NAND gate - boolean algebra
I am taking a digital logic class and i am trying to multiply this binary number. I am not sure what a carry in is and a carrry out. the teachers slides are horrbile. It appears he used a truth table to do this but its confusing.
X1X0
+ Y1Y0
----
Z2Z1Z0
I think thats how its set up! Now, for the multiplication part
1 carry in?
110101
X 1101
------
101011001 thats what i ended up with. Probobly, not right!
I think my truth table should look something like this: keep in mind this is not set up to my answer above
X1X0
+ Y1Y0
----
Z2Z1Z0
X0 Y0 Carry Z0
0 0 0 0
1 0 0 1
0 1 0 1
1 1 1 0
X1 Y1 Carryin Carryout Z1
0 0 0 0 0
1 0 0 0 1
0 1 开发者_运维知识库 0 0 1
1 1 0 1 0
0 0 1 0 1
1 0 1 1 0
I get confused on the x1 and y1 part It would be easier if i can see it in action and labeled what the "carry in" is and "carry out" is while its being multiplied.
would the "carry in" be the result of 1+1 and the "carry out" be the result of the next carry result?
I think after we get the truth table done with the carry in and carry out we are to use boolean algebra like:
Z1 = X1• Y1' • Carryin' + X1' • Y1• Carryin' + X1' • Y1' • Carryin + X1• Y1• Carryin
Carryout = X1• Y1• Carryin' + X1 • Y1' • Carryin + X1' • Y1• Carryin + X1 • Y1• Carryin
Z2 = Carryout
We are to "work out the equations for the AND, OR and NOT functions using only the NAND operator." not sure how to do this!
NAND
is simply an AND
operating followed by NOT
.
In terms of implementing the other boolean operations with just NAND
:
NOT a = a NAND a
a | (a NAND a) | result
--+------------+-------
0 | 1 | OKAY
1 | 0 | OKAY
a AND b = NOT (NOT (a AND b))
= NOT (a NAND b)
= (a NAND b) NAND (a NAND b)
a | b | x=(a NAND b) | (x NAND x) | result
--+---+--------------+------------+-------
0 | 0 | 1 | 0 | OKAY
0 | 1 | 1 | 0 | OKAY
1 | 0 | 1 | 0 | OKAY
1 | 1 | 0 | 1 | OKAY
a OR b = NOT((NOT a) AND (NOT b)) # DeMorgans Law
= NOT((a NAND a) AND (b NAND b))
= NOT(NOT ((a NAND a) NAND (b NAND b)))
= (a NAND a) NAND (b NAND b)
a | b | x=(a NAND a) | y = (b NAND b) | (x NAND y) | result
--+---+--------------+----------------+------------+-------
0 | 0 | 1 | 1 | 0 | OKAY
0 | 1 | 1 | 0 | 1 | OKAY
1 | 0 | 0 | 1 | 1 | OKAY
1 | 1 | 0 | 0 | 1 | OKAY
精彩评论