# Transistor as valve: introduction

The Qibec CPU does not actually operate using water-circuits - electrical circuits are used instead.

In this section, a few electrical components are introduced, analogous to the ones used previously in water-circuits.

Of these components, the focus will be on the transistor as switching element, analogous to a water-valve.

# Battery In a water-circuit, all pressure-differences are eventually caused by pumps. An electrical analogy to the water-pump is the battery.

As briefly stated before, a difference in water-pressure corresponds to an electrical voltage-difference. A battery can be placed between 2 points in a circuit to create a voltage-difference between those points.

Instead of the term "voltage-difference", people often say "voltage", meaning the voltage-difference between a location in the circuit and a well-known reference-point. That reference-point is often called the "ground", and in this case, corresponds to the negative terminal of the battery.

In the following examples, high voltage (with respect to the battery's negative terminal) is shown in red, while low voltage is shown in blue. For the sake of simplicity, only "high" and "low" voltages are considered - nothing in between. Lines connecting components represent wires.

Analogous to water-flow, there is also electrical flow - simply called "current". If there is a closed loop formed by components from a battery's positive terminal to its negative terminal, current may flow, depending on the value and state of the components.

# Resistor To cause an electrical resistance to current, a component called "resistor" is used.

If a current flows through a resistor, a voltage-difference exists between its terminals, with voltage decreasing in the direction of the current. If no current flows, the voltage is the same at both of its terminals.

Using batteries and resistors, very simple electrical circuits can be made, such as the one shown here. A battery causes a voltage at its positive terminal (with respect to its negative terminal). This voltage has to be "divided among" the components between the 2 battery-terminals.

In this case, the only component between the battery's terminals is the resistor, which will therefore take the full voltage-difference caused by the battery.

Current flows in the direction indicated by the circular arrow. The voltage at the corner of the circuit is high (red).

This situation is very similar to a previous water-circuit using only a single pump and narrowed-down piece of pipe.

# The transistor as switching element Analogous to the water-valve with its 3 holes, the transistor is a 3-terminal electrical component. Just like the valve, the pressure (voltage) at one terminal affects the conductivity through the remaining two terminals.

For the sake of simplicity, only states "conducting" and "non-conducting" are considered.

Looking at the electrical symbol, the controlling terminal is called "base", and the terminals controlled by the base-terminal are called "collector" and "emitter". (The emitter is the one with the arrow.) For this type of transistor, the controlled current - if there is any - flows from collector to emitter, that is, from top to bottom. When creating a simple schematic containing a battery, resistor and transistor as shown here (i.e. its base left open), the transistor acts as a non-conducting valve.

Therefore, the voltage at the circuit-location indicated by the arrow is high.

Note that in the water-examples, pumps could be switched off to indicate "no pressure-difference is applied here"

This was done to avoid possible misconceptions about water leaking out of the circuit. In the electrical examples, the choice is made to simply omit a battery when it's not needed. When a voltage is applied at the base of the transistor by means of a secondary battery, the transistor will conduct.

In this new situation, the voltages at collector- and emitter-terminal are the same.

The full voltage-difference caused by the primary battery must therefore fall over the resistor, and the voltage at the location indicated by the arrow is low.