Skip to main content
added 465 characters in body
Source Link
Tom Carpenter
  • 70.7k
  • 3
  • 158
  • 220

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.


Edit 2

Based on the comments, it's now become clear why you were getting different results from what you expected. Basically the output is a current sink when low. As a result if you connect an LED from VCC to the transistor, the LED will be on when the output is low and off when the output is high. This is the case with any load wired in such a way, because only when the transistor is pulling down low is there any voltage across the load.

(Edit: I was right the first time, it's a NAND)

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was right the first time, it's a NAND)

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.


Edit 2

Based on the comments, it's now become clear why you were getting different results from what you expected. Basically the output is a current sink when low. As a result if you connect an LED from VCC to the transistor, the LED will be on when the output is low and off when the output is high. This is the case with any load wired in such a way, because only when the transistor is pulling down low is there any voltage across the load.

(Edit: I was right the first time, it's a NAND)

edited body
Source Link
Tom Carpenter
  • 70.7k
  • 3
  • 158
  • 220

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was writeright the first time, it's a NAND)

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was write the first time, it's a NAND)

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was right the first time, it's a NAND)

deleted 21 characters in body
Source Link
Tom Carpenter
  • 70.7k
  • 3
  • 158
  • 220

That circuit looks like a NAND gate to me - soBasically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be on ifpulled down to zero by R2. If both of the inputs are high, but off when any of them are low.the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was write the first time, it's a NAND)

That circuit looks like a NAND gate to me - so the transistor will be on if both inputs are high, but off when any of them are low.

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function.

(Edit: I was write the first time, it's a NAND)

That circuit looks like a NAND gate to me - Basically what happens is that if any of the inputs are driven low, it will pull down the voltage reverse biasing the pair of diodes meaning the transistor will be pulled down to zero by R2. If both of the inputs are high, the input diodes will not conduct and the transistor base will be pulled high through R1 causing it to switch on:

╔═══╦═══╦═════╦═══╗
║ A ║ B ║ Tr. ║ C ║
╠═══╬═══╬═════╬═══╣
║ 0 ║ 0 ║  0  ║ 1 ║
║ 0 ║ 1 ║  0  ║ 1 ║
║ 1 ║ 0 ║  0  ║ 1 ║
║ 1 ║ 1 ║  1  ║ 0 ║
╚═══╩═══╩═════╩═══╝

If the transistor is on, it will pull the output down to ground, hence the NAND function. Essentially the extra transistor acts as an inverter and hence you see the opposite polarity.

Interestingly if you invert both inputs what you will actually end up with is an OR gate, not an AND as you thought.

(Edit: I was write the first time, it's a NAND)

deleted 21 characters in body
Source Link
Tom Carpenter
  • 70.7k
  • 3
  • 158
  • 220
Loading
Source Link
Tom Carpenter
  • 70.7k
  • 3
  • 158
  • 220
Loading