# Is my IC broken if Q1 == !Q1

The chip I'm using is the CD4013BE. datasheet: http://www.ti.com/lit/ds/symlink/cd4013b.pdf

I'm trying to make a flip flop using this circuit to store 1 bit of information. The datasheet says Q1 (with the line over it) is supposed to be the inverse of Q1. But whenever I hook up the circuit they are always both on. I've experimented with using all the others pins too, sometimes I can get the brightness to vary across the leds but they are both always on. I can never get it so 1 is on and the other is off. Is my IC broken? If not how can I fix this circuit.

The circuit images:

And finally my horribly crude circuit diagram:

So why are both leds always on? I thought they were supposed to be inverses of eachother?

• Put 1k0 pull down resistors on pins 3,4,5 and 6. – JIm Dearden Jan 27 '17 at 18:51
• @JImDearden Thanks, connecting 3&4 and 5&6 together? Or from 3v to pin 3, 3v to pin 4, etc? (Sorry if these are really dumb questions, I have 0 ee knowledge) – Keatinge Jan 27 '17 at 18:52
• @JImDearden Also is it okay if I use a 10k resistor? I only have 10k, 220, and 10 ohm resistors? – Keatinge Jan 27 '17 at 18:53
• See page 10 of the datasheet. If Set=Reset=1, then Q=Q=1 – Tom Carpenter Jan 27 '17 at 18:54
• 4 separate resistors and 10k is fine, it just needs to put a low on the set, reset pins etc. – JIm Dearden Jan 27 '17 at 18:54

If you refer to the truth table on Page 10 of the datasheet (section 7.4), the answer to your question is simply, no, it's almost certainly not broken.

Notice that when Set and Reset are both high, then both Q and Q are also high, therefore both outputs being high is not on its own an indicator of being "broken".

When left floating, the value of a 4000 series logic IC input is in a completely unknown state. It may represent a high value, or it may represent a low value. The protection circuitry on the input will pull it to somewhere mid-supply due to reverse leakage currents in the clamping diodes.

In your case it is likely representing a high level as without any other evidence this would account for the behaviour you are seeing.

Review table 1 on pg 10. Both Q and !Q will be high if reset and set are both high. You likely need to pull these pins low before the chip will operate as you expect.

• Hmm, going to test this now. I assumed having no connection would be the same thing as low? I guess 0v doesn't count as low? – Keatinge Jan 27 '17 at 18:56
• @Keatinge The catch is that "no connection" doesn't equal "0 V" – W5VO Jan 27 '17 at 19:04
• @Keatinge : Voltage is always relative. Thus, if you connect a pin to low, it is 0v relative to the low side of your power supply. If you don' t connect it, it is 0v relative to the unknown, which may be equal to your power supply's high, or relative to the high voltage power lines running somewhere nearby, etc. – Extrarius Jan 27 '17 at 19:05
• @Keatinge putting a resistor to +ve (high) would not help you. It would simply guarantee the condition that causes both outputs to be high. Now putting the resistor between input and 0 (low) would remove that condition. – Tom Carpenter Jan 27 '17 at 19:07
• @Keatinge 0V that was supposed to say. i.e. GND – Tom Carpenter Jan 27 '17 at 19:13