# Why are remote computers never started?

## exorciser.ch

đź’ˇ â€śComputers are made up of countless switchesâ€ť. This article shows you how several transistors can be combined to form different logic circuits (logic gates) and how simple adders can be built from these.

### Transistors

The switches in a computer chip are not turned on and off with a finger, but with different charges. Figure 1 on the left shows a normal, switched-on switch with two connections. The arrow indicates that electricity is flowing. In the middle is a cross-section through a switch used for a computer chip, the transistor.1) The source and drain are the two connections through which the current flows when the switch is switched on. The transistor shown is switched on by a positive charge at the gate connection. The positive gate charge pulls free electrons upwards from the N-Si semiconductor layer, so that an excess of electrons is created between the P-Si semiconductors. This allows current to flow through the P-Si â†’ N-Si â†’ P-Si transition. The insulation ensures that no current flows through the gate. On the right is the symbol (circuit diagram) of the transistor.

 Fig.1 Switched on transistor Normal switch Structure of the transistor Circuit diagram transistor

If a negative charge is applied to the gate, the transistor does not conduct, it blocks (see Fig. 2).2) The negative gate charge pushes the free electrons of the N-Si layer downwards. There are therefore too few free electrons between the two P-Si layers and no current can flow through the P-Si â†’ N-Si â†’ P-Si transition.

 Fig.2 Switched off transistor Normal switch Structure of the transistor Circuit diagram transistor

### Binary numbers 0 and 1

đź¤Ş Fish soup and lampshade?

A computer consists of almost innumerable switches, the transistors. Each switch can have two states - and. How these states are called is completely arbitrary. You could also call the states â€śfish soupâ€ť and â€ślampshadeâ€ť. Or maybe you can think of crazy names yourself.

đź‘« Binary numbers and logic gates - a nice pair

But it has been shown that the naming and is quite practical. Numbers that only consist of and are called binary numbers. These can be counted and calculated quite â€śnormallyâ€ť. The nice thing about it is that circuits can be built with transistors, which, thanks to the naming and binary numbers, can calculate and compare with each other.

đź¤” Are there also â€śternaryâ€ť computers?

Yes, it is possible to build ternary logic circuits, i.e. logic circuits with three states (, and or, and or,,). Ternary computers have also been built. In principle, ternary computers are even more efficient than binary computers. The reason why there are practically only binary computers is that the mass production of binary logic gates is cheaper than that of ternary ones. However, it is quite possible that computers will be predominantly ternary in the future.

### Logic gate

đź’ˇ Logic circuits, also called logic gates, can be built with transistors. Simple controls can already be built with logic gates. E.g. the control of a refrigerator interior lighting, a washing machine or a fan. In this chapter you will find out what logic gates do and what they have to do with â€ślogicâ€ť.
đź’ˇ You can find out how the logic gates can be built from transistors in the section "Structure of logic gates" (a chapter for those who are quick and interested).

#### task

1. Open the layer model of a computer. As you can see from this, logic gates are made up of transistors. The â€ślogic gateâ€ť layer is therefore also above the â€śtransistorsâ€ť layer. Now look at the three layers above the "Logic Gate" layer. As you can see, no refrigerator or fan controls are built from logic gates for a computer.
2. Now the question: What kind of circuits are built from the logic gates in the three layers above the â€ślogic gateâ€ť layer? In the text field below, replace the three points ... with a suitable word. If the word is correct, the text field is colored green. Loading âŚ›

### NOT [!]

#### NOT gate

Below you can see an interactive NOT gate (recognizable by the symbol). If you click on the input (on the square â–ˇ), the input switches back and forth between two states. The â€śwhite stateâ€ť is designated or, the â€śred stateâ€ť or. Try it out right now!

Loading âŚ›

âš ď¸Ź As you can see, the exit always shows the opposite of the entrance. If it is white, then it is red and vice versa. This circuit is therefore called a NOT gate, as it always outputs the opposite or, in other words, â€śnegatesâ€ť the input.

âš™ď¸Ź Application: The refrigerator lighting can be controlled with a NOT gate. If the refrigerator door is closed, the door switch is activated (is). This switches off the light inside the refrigerator (is). When the door is opened, the door switch is activated and the lamp inside starts to shine (is).

đź’ˇ The states of the inputs and outputs can be described in many ways, e.g. as follows:

Status number Truth value
a 1 true / true
out 0 false / false

The assignment and (in German: "true" and "false") is used in logic and programming.

#### NOT truth table - task

1. The "truth table" shows which input, which output belongs, where for and stand for. Fill out the following truth table for the NOT gate.

Loading âŚ›

đź¤” What does this have to do with "logic"? The statement "4 is an even number" is true (i.e. or). The opposite of this (the negation) must therefore be false (i.e. or): "4 is not an even number". The statement "4 is divisible by 3" is wrong. The opposite of this must therefore be true: "4 is not divisible by 3". That is exactly what the truth table describes.

### AND [&]

#### AND gate

Below you can see an interactive AND gate (recognizable by the symbol). The AND gate has two inputs and one output. The output is only then when both inputs and are at the same time. Try it!

Loading âŚ›

âš™ď¸Ź Application: With an AND gate, the safe switching on of a washing machine can be guaranteed. One of the two AND inputs is a door switch that is only active when the door is closed. The other input is the washing machine's start button. The washing machine will only start if both inputs are on (output), otherwise the washing machine will not start (output).

#### AND truth table task

1. Fill out the following truth table for the AND gate. Loading âŚ›

đź¤” What does this have to do with "logic"? Consider the following sentence: "If it rains and I go out, I'll get wet." The conclusion "I am getting wet" is only true (i.e. or) if the statement "it's raining" and at the same time the statement "I'm going out" are true (i.e. or). If at least one of these two statements is wrong (i.e. or) then the conclusion is also wrong (i.e. or). That is exactly what the truth table describes.

### OR [â‰Ą1]

#### OR gate (OR gate)

Below you can see an interactive OR gate (recognizable by the symbol). The OR gate has two inputs and one output. The output is only then when both inputs and are at the same time. Try it!

Loading âŚ›

âš™ď¸Ź Application: With an OR gate, a fan can be switched on automatically or manually. One of the two OR inputs is a temperature sensor that is only available when the temperature exceeds a certain value. The other input is the start button of the fan. As soon as one of the two inputs is (or both are), the fan is started (output). The fan (output) only stops when both inputs are on.

#### OR truth table - task

1. Fill out the following truth table for the OR gate. Loading âŚ›
2. đź¤” What does this have to do with "logic"? Think about a sentence that fits the OR truth table (analogous to the sentence "If it rains and I go out, I'll get wet." for the AND truth table). Write the sentence in the text field below. Loading âŚ› Reply access
For example, consider the following sentence: "When you clean the bathroom or when I clean the bathroom, the bathroom is clean." The conclusion "The bathroom is clean" is true (i.e. or) if at least one of the two statements "You clean the bathroom" and "I clean the bathroom" true (i.e. or) are (both can clean the bathroom at the same time). If both statements are wrong (i.e. or) then the conclusion is also wrong (i.e. or). That is exactly what the truth table describes.

### đź¤© Structure of the logic gate

đź¤© Chapter for those who are quick and interested

đź’ˇ In this chapter you will learn how logic gates can be built from transistors. To do this, we expand the naming of the transistor states by and.

Status number Truth value charge
a 1 true / true +
out 0 false / false -

### NOT gate

#### construction

How can a NOT gate be built from transistors? In Fig.1, the construction plan of a NOT gate is shown twice. The input corresponds to the gate of the transistor.

âš ď¸Ź About physics: electrons are negatively charged and repel each other. Electrons migrate from the negative pole of a power source (there is an excess of electrons there) to the positive pole of a power source (there is a shortage of electrons).

In the figure on the left, there is a positive charge at the input. The transistor conducts and electrons flow from the negatively charged connection of the power source (blue horizontal line below) to the positively charged connection of the power source (red horizontal line above). The electrons also have to pass through the resistor. However, since only a few electrons can flow through at the same time, the electrons accumulate in front of the resistor (similar to cars in front of the Gotthard tunnel). Since electrons are negatively charged, the accumulation of electrons causes a negative charge to arise at the exit.

In the figure on the right, there is a negative charge at the input. The transistor blocks, no new electrons can follow through the transistor. Therefore all electrons present flow away through the resistor to the positively charged connection. The result is a lack of electrons in front of the resistor. The lack of electrons causes the output to take on a positive charge.

 Fig.1 NOT gate Input 1 - output 0 Input 0 - output 1

### AND gate

e1 e0 a
0 0 0
0 1 0
1 0 0
1 1 1

#### construction

How can an AND gate be built from transistors? In Fig. 2 a construction plan is shown twice. Two transistors are "linked" (connected in series). The two gates represent the two inputs and. If both are inputs, then the output is (left figure). In all other cases the exit is (right figure).

 Fig.2 NAND gate Input 1 1 - output 0 Input 1 0 - output 1

âš ď¸Ź But that is exactly the opposite of the AND truth table! Therefore, the logic gate in Figure 2 is referred to as the NAND gate (not-and-gate). To get a real AND gate, simply add a NOT gate to the output of the NAND gate. This is shown in Figure 3.

 Fig. 3 AND gate Input 1 1 - output 1 Input 1 0 - output 0

#### task

1. This task relates to that NAND gate in Figure 2. The following two situations are not shown in Figure 2. If positive and negative, then is positive. If negative and negative, then is positive. Explain why this is so in the text field below. Loading âŚ› Reply access
The whole thing works similarly to the NOT gate. If the electrons can flow through both transistors (both gates have the entrance), they accumulate in front of the resistor and the exit becomes. If one of the two transistors blocks (gate with input) or if both transistors block, no electrons follow, the electrons still present flow away through the resistor and the output becomes.

### OR gate

#### Truth table

e1 e0 a
0 0 0
0 1 1
1 0 1
1 1 1
##### Structure of OR gate

How can an OR gate be built from transistors? In Fig. 4 a construction plan is shown twice. Two transistors are connected in such a way that there are two different paths from the negatively charged connection of the current source to the positively charged connection of the current source (connected in parallel). The two gates represent the two inputs and. If both are inputs, then the output is (left figure). In all other cases the exit is (right figure).

 Fig.4 NOR gate Input 0 0 - output 1 Input 0 1 - output 0

âš ď¸Ź But that is exactly the opposite of the OR truth table! Therefore, the logic gate in Figure 4 is called NOR gate (Not-Or gate). To get a real OR gate, simply add a NOT gate to the output of the NOR gate. This is shown in Figure 5.

 Fig.5 OR gate Input 0 0 - output 0 Input 0 1 - output 1

#### task

1. This task relates to that NOR gate in Figure 4. The following two situations are not shown in Figure 4. If negative and positive, then negative. If positive and positive, then negative. Explain why this is so in the text field below. Loading âŚ› Reply access
The whole thing works similarly to the NOT gate. If the electrons can flow through at least one of the two transistors (one gate or both gates have the entrance), then they accumulate in front of the resistor and the exit becomes. If both transistors block (both gates have the input), no electrons follow, the electrons still present flow away through the resistor and the output becomes.

### Adder

Adders for two binary numbers of any length can be built from the logic gates that we have already learned about. We start with a simple adder, which can add two individual bits (the so-called "half adder") and then consider more complex adders up to the adder. For those who are interested and quick, there is also an insight into the arithmetic-logical unit, a more comprehensive arithmetic unit that masters all basic arithmetic operations and can compare numbers.

### Half adder [HA]

Below you can see an interactive half adder (recognizable by the symbol). The half adder adds two single bits and to a two-digit binary number consisting of the two digits and. If the value and the value have, then the two-digit binary number becomes too. Try it!

Loading âŚ›

đź’ˇ When adding two numbers in writing, the current digits of the numbers to be added and any carryover are added together. The half adder can add two digits and, but it has no input for a carry and therefore cannot include a carry. Hence the name "half". However, the output of the half adder contains a carry for any further additions. The output denotes the current position of the addition, the output denotes the carry.

#### HA truth table - task

1. Fill out the following truth table for the half adder. Loading âŚ›

#### Structure of the half adder - task

1. A half adder can be constructed from NOT, AND and OR gates. You can see a circuit diagram for this below. In the text field below the scheme, write in which positions a NOT, which an AND and which an OR gate belongs to. You are welcome to puzzle in pairs.

Tip: Start with the two gates C and D. If you can't figure out A and B, refer to the â€śAnswer Accessâ€ť at the end of this exercise.

Note: The truth tables for NOT [!], AND [&] and OR [â‰Ą] are: Loading âŚ›
 Half adder (HA) circuit diagram

Loading âŚ›

Reply access

### Full adder [VA]

Below you can see an interactive full adder (recognizable by the symbol). The full adder adds three individual bits and to a two-digit binary number consisting of the two digits and. If, and all have the value, the two-digit binary number becomes too. Try it! Loading âŚ›

đź’ˇ When adding two numbers in writing, the current digits of the numbers to be added and any carryover are added together. In contrast to the half adder, the full adder can add two digits and and a carry. Hence the name "Voll". The output of the full adder denotes the current position of the addition, the output denotes the carry.

#### VA truth table - task

1. Fill out the following truth table for the full adder. Loading âŚ›

#### Structure of full adder

A full adder can be implemented with two half adders and an OR gate. Loading âŚ› If the half adders are replaced by the NOT, AND and OR gates they consist of, the following circuit results. Loading âŚ›

#### task

1. Above you have seen two variants for the construction of a full adder.Once the full adder was constructed from half adders and once directly from logic gates. Why does it make sense to only compare neighboring layers in the layer model? What advantage do the upper layers offer over the lower layers? Discuss this with a colleague and write your thoughts in the text field below. Then compare your answers with the answer access below. Loading âŚ› Reply access
The structure of the full adder can be explained more easily with half adders (and an OR gate) than just with logic gates. If a circuit consisting of several logic gates is represented by a single element (e.g. a half adder), the clarity is increased. To understand how the full adder works, one does not need to know what it looks like inside a half adder - it is sufficient to know what a half adder does. In this sense, an upper layer summarizes the essentials of a lower layer and thus facilitates understanding of the next layer above (e.g. the adder).

### The adder

The aim is to add the following written addition of two three-digit binary numbers and, consisting of the three digits and, to the four-digit binary number, consisting of the four digits, according to the following example calculation.

Job 3 2 1 0
Binary number, i.e.
+ Binary number, i.e.
+ Carry over c 1 1 1
= Sum, i.e.

The following simulation can do just that. The corresponding points are always combined in the simulation, i.e. the sequence in the simulation is from top to bottom.

Loading âŚ›

Variant with additional visualization of the inputs

To calculate the position, it is sufficient to add the two bits and. We do not yet have to consider a carryover from another calculation. Therefore, a half adder is sufficient to calculate. However, this calculation itself can result in a carry, which the half adder also outputs.

To calculate the position, the two bits and and the carry from the calculation must be added. A full adder must be used for this. This also outputs a carry for the next calculation.

The digit is calculated from the full adder, and that from the calculation and also results in another.

Although all three digits of both numbers x and y have now been offset, the carryover from the calculation must still be taken into account. For this, this is simply output as, i.e. as the fourth digit of the number.

Loading âŚ›

#### task

1. What does a circuit for two four-digit binary numbers look like? Together with someone else, sketch such a circuit on a piece of paper. Then you should be clear how two arbitrarily large binary numbers can be added with circuits of any size.
2. Then mark this task as "Done".

### đź¤© Arithmetic-logical unit (ALU)

đź¤© Chapter for those who are quick and interested

The arithmetic-logic unit (ALU) is an arithmetic unit that can not only add, but also subtract, multiply, divide, compare two numbers and use logical operations such as AND, OR, NOT. It is made up of several adders and logic gates.

For the subtraction, the number to be subtracted is converted into the binary equivalent of a negative number, the two's complement, and added to the first number (for details, see Calculating with the two's complement). As with writing multiplying and dividing decimal numbers, multiplying and dividing can be traced back to adding and subtracting numbers. The four basic operations can thus be implemented with one adder.

Not only whole numbers can be calculated, but also floating point numbers. In order to be able to represent a floating point number in binary, it is written in exponential notation and the signing with one bit, the exponent with a previously defined number of bits and the mantissa with a previously defined number of bits are displayed as precisely as possible (for details see floating point representation / floating point numbers and Converting a floating point number into the floating point representation). Due to the specified finite number of bits, the accuracy of the representation of floating point numbers is limited. This means that errors can occur when calculating floating point numbers in binary form.