PDA

View Full Version : Logic Circuits



Govtcheez
01-14-2002, 02:21 PM
The XAND discussion on the C++ board made me think...

First, if there is actually an XAND, like Shiro says, what's its truth table?

Secondly, in my digital circuits 1 course, we were told that any digital circuit could be designed using a standard NAND gate (well, a LOT of standard NAND gates)... If this is true, how would you design a flip-flop from them (we'll just say a J-K for simplicity's sake)? Also, would there be a way to create the clock needed to drive one using standard NANDs?

Stoned_Coder
01-14-2002, 03:34 PM
This might help. (http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/nand.html)

iain
01-14-2002, 04:22 PM
that points to a NAND not a XAND, XAND would be exclusive and which is kind of self-contradictory.

It is true that any logic gate ca be constructed from NANDS

maes
01-14-2002, 04:26 PM
>> we were told that any digital circuit could be designed using a standard NAND gate (well, a LOT of standard NAND gates)... If this is true, how would you design a flip-flop from them (we'll just say a J-K for simplicity's sake)?

Yes you can. for the J-K flip flop, it would take 9 nand gates.

As for the clock, you can make it with two inverters and you can build an inverter out of nand gates.

Never heard of an XAND gate, but it wouldn't surprise me if it exists (sp?)

Stoned_Coder
01-14-2002, 04:48 PM
i belive xand is a terminology for nand.
truth table...


a b a nand b
0 0 1
0 1 1
1 0 1
1 1 0

Govtcheez
01-14-2002, 05:27 PM
> As for the clock, you can make it with two inverters

Really? Do you have a picture? That sounds kinda neat...

iain
01-14-2002, 05:38 PM
....tried to upload a circuit diagram of an XOR built with NANDS but it wouldnt upload.

maes
01-15-2002, 02:14 AM
here is the pic. I think it is called a astable or non stable multivibrator

Govtcheez
01-15-2002, 07:01 AM
So it can't be built only from inverters? You have to use resistors and caps, too?

maes
01-15-2002, 09:07 AM
Yes, but maybe there is an other way to do it. But I think you will need capacitors each time so you can control the timing (with the load time of it)

adrianxw
01-15-2002, 10:59 AM
I don't think you could make an oscilator out of invertors alone. Oscilators exist, by their nature, in unstable states, invertors are stable. You need to destabilise them. You might also want to look at the 74121, and why build a j-k when you can get two on a chip, (7473)?

Govtcheez
01-15-2002, 11:00 AM
> and why build a j-k when you can get two on a chip, (7473)?

I know that - it's purely academic - I just wanted to know if it could be done.

Shiro
01-15-2002, 12:16 PM
A XOR-port can be built up from two AND-ports and one OR-ports. When in this circuit replacing all AND-ports by OR-ports and thel OR-ports by an AND-port you get an XAND.

The output of an XOR-port is high if only one of the input bits is high. The output of an XAND-port is high if only one of the input bits is low.

Stoned_Coder
01-15-2002, 12:43 PM
so xand and xor have the same truth table. How do you tell the difference ? sounds like they would operate the same if they have the same truth table.

Shiro
01-15-2002, 01:00 PM
XOR and XAND do not have the same truth table.

>The output of an XOR-port is high if only one of the input bits is >high. The output of an XAND-port is high if only one of the input >bits is low.

For a 2-bit input, the XAND behaves as an XNOR. But when more bits are supplied at the input, it doesn't.

Stoned_Coder
01-15-2002, 01:11 PM
xor truth table

a b a xor b
0 0 0
0 1 1
1 0 1
1 1 0



from your description xand truth table

a b a xand b
0 0 0
0 1 1
1 0 1
1 1 0


now for a 2 input gate show me the difference!!!

this clearly shows that xand behaves as xor does.

Govtcheez
01-15-2002, 01:16 PM
Oh, I get it...

It would be different for more than 2 inputs..

a b c XOR
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0

a b c XAND
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0

Right?

Shiro
01-15-2002, 01:16 PM
>For a 2-bit input, the XAND behaves as an XNOR. But when >more bits are supplied at the input, it doesn't.

Yep, XNOR should be XOR. As I told, for a 2-bit input the XAND and XOR behave the same. So for a 2-bit input there is no difference.

But I propose you draw the schematic of a 3-input XAND and you'll see that the truth table is different from a XOR.

Govtcheez, you are right. I wrote this post while you were writing yours.

Stoned_Coder
01-15-2002, 01:22 PM
ok that follows..... never heard of xand before. I learn something new everyday.

skyline
01-20-2002, 03:39 AM
ahhh, this thread reminds me of the ole digital design classes. I hear now a days a lot of these classes use these FPGA boards (http://www.digilent.cc/), rather than the plain old protoboard (wiring that thing sux, especially when you spend hours debugging and find out just one stupid wire was loose...). They look really fun to tinker with, don't you think!?

Govtcheez
01-20-2002, 09:06 AM
> find out just one stupid wire was loose

Ahh, memories...

For the record - not everyone uses those new boards - I took Digital Circuits last spring and we just used normal breadboards...