Logical Circuits
Let’s take the logical gates that support the mathematical abstraction of our reasoning and combine them together according to the logical reasoning that lead us to the desired end . We will always try to get where we want through a logical reasoning that we will develop step by step.
During this Chapter we’ll address a fundamental concept of a computer operation, the one that allows the synchronization of all its components and their activity : The Clocked Logic.
Every quartz crystal issues an electrical pulse inevitably repeated with the same frequency while the crystal is excited electrically. It’s the frequency of vibration of that quartz crystal. Those electrical pulses when issued into a computer circuit are called the Clock of the computer.
Each computer component has a specific frequency of vibration for its circuits, its own clock, provided to it by the master elements of the computer by phasing the original clock. Knowing the Clock of all the computer components its main Chips use it for their synchronization, as we will see throughout all our work.
To understand the quartz crystal vibration just see a quartz watch. It uses a quartz crystal issuing pulses that are counted by a digital counter (we’ll see in this chapter what it is). When a defined number of pulses is reached, one unit of time associated with it (the second for instance, but not necessarily) will increment (add 1). As the frequency of the quartz crystal is always the same, the quartz watch is precise in time measure. With a problem: they use a battery, don’t they? And what happens when the battery fails? The watch stops. Precisely because the quartz crystal ceased to be electrically excited and stopped issuing pulses.
The computer operation is based on Clocked Logic. When we put a set of bits to run in the several circuits of a computer, we must ensure that we only analyze them when they all fulfill their functions. In order to do this we have to stop the first to arrive and wait for the last so that the analysis is made to the all set of bits together. Each one fulfills its task but the final correct value will only be achieved when analyzing them all together at the end of the same global task.
For example: The memory has a clock different from the one of the bus that carries data between it and the CPU, which also has a different clock. But all the bits that represent together a given value and travel between both components have to be controlled and kept together in the appropriate locations so that when they are read they actually represent correctly the desired value. They must have a time to fulfill their task (the clock cycle) and a place where to meet together (we’ll just see where).
Due to the complexity of this question a significant part of this chapter is dedicated to it, the Clocked Logic, always integrating this theme with the others we will be dealing with.
In this chapter we will combine the different logical gates we discussed two chapters ago in circuits that have very specific functions useful for the themes we will later deal with. With these circuits we can already execute arithmetic operations like the division and multiplication by iterations. The CPU is built with these circuits. To understand how the CPU works and executes a program, we must know and understand these circuits . To understand how the memory works we need to understand these circuits. In short, to understand all the computer operation we have to know and understand these circuits .
We will analyze the Multiplexer, a kind of circuit that allows the binary selection from one between several options. For instance, with 1 bit we can select two options or circuit inputs. Notice the equivalence of this circuit operation with a conditional decision if … then … else …from any program. The choice that reaches the circuit comes in the shape of a binary 0 or 1, true or false, resulting e.g. from the analysis of a logical comparison between human values. And this binary value will allow to choose between two possible operations or paths .
We will analyze the Decoder, a kind of circuit that allows with a reduced set of bits choose a larger set of possibilities from an even larger set of combinations. For instance, with 4 bits we can choose 16 possible options from the 256 possible combinations of 8 bits, since only these 16 combinations interest us. This circuit will have its application clearly demonstrated when analyzing the CPU.
We will analyze circuits of logic memory like the Flip- Flop SR, which can memorize the value of one from two variables each time the variable to memorize changes its state and keep its value until the other variable changes its state, the Flip-Flop D, which can memorize the value of a variable whenever the clock is high and the Edge-Triggered D Flip-Flop , which can memorize the value of a variable always and only when the clock changes its state.
This last one, the Edge Triggered D Flip-Flop is the place we mentioned before where the bits will meet together, the first one waiting for the last one, at the end of a clock cycle. Something we’ll see during this chapter. A theme where the Clocked Logic will be referred again, as it has all to do with it.
We will see the Bit Shifting circuits which shift left or right the bits, one for each clock cycle. What’s this good for? For instance to convert a parallel transmission into a serial one. It receives 64 bits at once from a parallel circuit and sends them one by one during 64 cycles to a serial circuit. Each time a shift is performed one bit is lost, or in this case sent into the serial circuit.
But, how does it know that the 64 bits are sent. That’s the job for another circuit, the Binary Counter, which will increment or decrement its value for each clock cycle. One more circuit to be analyzed in this Chapter.
See the global synopsis of this work
We introduce here the table of contents of the Paper Book to describe the themes approached in this Chapter