Instead of a traditional TTL output which is around +5 volts for high and around 0 volts for low, a digital output known as an open collector connects to ground for low and is open for high.

These beauties are the basic building blocks of NANDs, NORs, and NOTs. And understand them not only puts you on your way to becoming a great engineer but you can impress your friends with terms like "collectors", "emitters" and "bases"!

An open collector is just a BJT with the emitter grounded. The collector is left floating or unattached to anything hence it is called an open collector.

The key to understand this circuit is realizing when there is no voltage applied to the base of the BJT, no current can flow from the collector to the emitter. When a voltage is applied to the base, the BJT turns on, allowing current to flow from to the collector straight throught the emitter and right to ground.

Now, if a voltage is just connected to the collector, let's just pick 5 volts, when the BJT is turned on, that 5 volts is going to flow right through the collector, straight through the emitter and will go right to ground. Thus creating a short circuit, the BJT will probably be destroyed and all hell will break loose.

Why? The amount of current running through the BJT will be huge! Remember the equation V = I * R. Well, if the BJT has a small resistance the current using the equation I = V / R will become huge. If the resistance were 1 ohm across the BJT the current would be 5 amps!

So great! We're going to destroy the damn BJT each time! Nope. That is where this crazy notion of pull-up resistors come from. A pull-up resistor is connected between the collector and the 5 volts, pulling up the voltage and protecting the circuit. When the BJT is turned on, the resistor keeps the circuit from short circuiting.

Now we get to the fun stuff. Creating NANDs, NORs and NOTs.

NOT

A NOT gate is the circuit described above and displayed below.

        / \  5 volts
         |
         |
         \
         /  Rp
         \
         |
         |	
  C -------------- F

C is a connection to the collector and F is a node. If the BJT is turned off, meaning no voltage is applied to the base, the voltage and current flows to node F. We can say node F is now on. When a voltage is applied to the base and the BJT turns on, all the voltage and current flows through the BJT and goes to ground. Node F is now off.

In other words when the base is low node F becomes high. And when the base is high, node F becomes low. Thus whatever voltage is applied to the base, the opposite voltage will be applied to node F. The truth table is shown below.

     B   |   F
   -----------
     0   |   1
     1   |   0

NAND

NAND's use two BJTs connected together in series. The collector from the first BJT is connected to the emitter to the next BJT. The emitter of the first BJT is still connected to ground and the collector of the second BJT is connected to the pull-up resistor and node F. Let's call the base of the first BJT A and the base of the second BJT B.

In order to get a voltage to flow through both BJTs, A and B need to be high. When this happens, the voltage will flow through the resistor, across each BJT, and straight to ground. This will cause node F to become low. Any other combination of A and B being either high or low will not turn on both BJTs and node F will remain high. The truth table is shown below.
     A  B  |  F
   -------------
     0  0  |  1
     0  1  |  1
     1  0  |  1
     1  1  |  0

NOR

This brings us to the NOR. The NOR uses two BJTs but this time they are stacked one on top of each other. Both emitters on each BJT are connected to ground and both collectors are connected to the pull-up resistor and the node F. We shall call the base of the top BJT A and the base of the bottom BJT B.

The only way to keep node F high in this setup is to have both A and B low. If neither of the BJTs are turned on, the voltage flows to node F. When either A or B is high, one or both BJTs are turned on and the voltage follows the path of least resistance straight to ground, causing node F to become low. The truth table for this is showing below.

     A  B  |  F
   -------------
     0  0  |  1
     0  1  |  0
     1  0  |  0
     1  1  |  0

ANDs and ORs

How to we get ANDs and ORs?!?!? Simple! Take the output of a NAND and put it through a NOT. And now you've got yourself an AND. To build this circuit connect node F of the NAND to the base of the NOT. And likewise sending a NOR throught a NOT gets you an OR. Of course this is an overly simple way of doing it, but you get the idea.

NAND and NOR logic is always faster to implement because it doesn't have to go through a NOT circuit.

Log in or register to write something here or to contact authors.