Quantcast
Channel: User periblepsis - Electrical Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 1477

Answer by periblepsis for Can I simplify a half-adder when using only NAND gates?

$
0
0
My question is, assuming my work above is correct, can simplify my drawingof half-adders by using    (xy')'    (x'y)'immediately once I find them, and passing them through one more NAND gate toarrive at XOR(x,y)? 

If I understood your writing (I can't say that I parsed everything perfectly, but I think you made sense as I read through), then yes:

F = x y'+ x' y = ( (x y')' (x' y)' )'

I think that is what you wrote about. Do you agree?

If so, then the above suggests the use of 5 NANDs, using two NANDs as inverters:

x' = NAND( x, x )y' = NAND( y, y )xy' = NAND( x, y' ) = NAND( x, NAND( y, y ) )x'y = NAND( x', y ) = NAND( NAND( x, x ), y )F = NAND( xy', x'y ) = NAND( NAND( x, NAND( y, y ) ), NAND( NAND( x, x ), y ) )

Or something like this:

enter image description here

I think you may have also asked about being able to simplify, in your title.

Follow along:

enter image description here

The above can also be seen by drilling in on these two from the earlier work:

xy' = NAND( x, NAND( y, y ) )x'y = NAND( NAND( x, x ), y )

And swapping terms, so that:

xy' = NAND( y, NAND( x, y ) )x'y = NAND( NAND( x, y ), x )

At this point it is clear this is the same as:

(xy)' = NAND( x, y )xy' = NAND( (xy)', y )x'y = NAND( (xy)', x )

And that's how one might simplify further.

I'm sure you know this only addresses the sum part of the half-adder, not the carry-out part. But it should be clear enough, at this point, that you already have the (xy)' term and all you need to do is invert it to get your carry-out term.

A full-adder adds more. But let your mind play around like this when attacking that. You should be able to get to nine NAND gates, in total, for the full-adder.


Viewing all articles
Browse latest Browse all 1477

Trending Articles