# Logic Circuits

This is a discussion on Logic Circuits within the A Brief History of Cprogramming.com forums, part of the Community Boards category; The XAND discussion on the C++ board made me think... First, if there is actually an XAND, like Shiro says, ...

1. ## Logic Circuits

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?

2. 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

3. >> 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?)

4. i belive xand is a terminology for nand.
truth table...
Code:
```a  b  a nand b
0  0       1
0  1       1
1  0       1
1  1       0```

5. > As for the clock, you can make it with two inverters

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

6. ....tried to upload a circuit diagram of an XOR built with NANDS but it wouldnt upload.

7. here is the pic. I think it is called a astable or non stable multivibrator

8. So it can't be built only from inverters? You have to use resistors and caps, too?

9. 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)

10. 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)?

11. > 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.

12. 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.

13. 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.

14. 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.

Page 1 of 2 12 Last
Popular pages Recent additions