Fundamentals
The internal operation of the CPU is probably simple enough to be understood with little prior knowledge about electronics or digital logic.
To recap, a quick (and very incomplete) introduction to electronics and digital logic is given in the following sections.
Ideally, the reader would be familiar with, or get a feeling for the material presented here. However, this is not necessary in order to program the CPU, from a pure software point of view.
(Throughout this chapter, names and symbols for some concepts are deliberately changed in order to make the text mode accessible. For example, logic gates are called "blocks", and their symbols are more verbose than the standardised versions.)
In this chapter...
- First, boolean logic is introduced, since this is the basis on which many digital circuits (such as the Qibec CPU itself) operate.
- Then, water is used as an analogy to introduce electrical circuit-theory including voltage, resistance and on/off-switches. (In the scope of the CPU presented here, this analogy holds quite well.)
- Still using this water-analogy, an imaginary implementation of boolean/digital logic is given using pressure-controlled valves.
- Once this concept of digital logic is clear, the transistor is shown to be able to work just like an on/off valve. (On the lowest level, the Qibec CPU consists only of transistors and resistors.)
- The water-analogy is abandoned, and electrical digital logic gates are introduced, consisting of transistors.
- Finally, the binary number-system is introduced, which forms numbers out of binary digits, or bits.
(Beyond the concept of digital logic gates, there's not much more to the CPU - it simply consists of these gates, with a lot of duplication rather than complexity going on.)