15.2 From computer architecture to logic gates 289
computation. As the figure shows, the ALU works with two dedicated memory buffers,
called registers, or sometimes “accumulators.” The two registers (A and B) are input
from the memory with binary data words a
1
a
2
,...,a
k
and b
1
b
2
,...,b
k
of identical size,
typically k =32 bits, 64 bits, and, today, 128 bits. This size is the same as that of the cells
in the memory, and also of the address used to index the memory cells (the memory,
thus, has 2
k
different addresses). Registers are literally used as scratchpads for the ALU
to perform various logical operations between the two data words {a
i
} and {b
i
}, such as
addition, subtraction, multiplication, division, comparison, complementation, rotational
permutation, overflow test, and zero-divide test, for the main ones. These operations are
performed by an internal circuit of the ALU, which is formed of a complex network of
logic gates, whose functions can be switched at will through a set of control bits. A basic
example of a four-bit ALU circuit is provided later in this chapter (one may yet have a
look at Fig. 15.6 for a flavor), which will come after I have described the principles of
the elementary logic gates themselves.
All logical operations between the register data and the ALU are instructed from a
“micromachine” program, which decodes the higher-level instructions fed by the com-
puter memory into micro-instructions making the ALU capable to handle the register
bits. The ALU is complete with an internal buffer register. Today, the integrated version
of the ALU, internal buffer, and micromachine decoder represents what is referred to as a
CPU, for central processing unit.
7
The CPU is, thus, a machine to “crunch bits” from the
higher-level instructions of the central memory, hence the popular name “computer,”
which today means far more than just a calculator, although the appellation remains
conceptually exact. Note that the VN architecture is not the only one possible. Indeed,
several VN machines, or CPUs can be set to work in parallel, each being dedicated
to an independent fraction of the computing algorithm, or more simply being assigned
a share of the number-crunching groundwork. This is referred to as parallel or multi-
processor architecture, to be viewed either as a magnified VN master machine ruling
over many CPU slaves, or a “democratic” group of VN machines putting their effort
towards some common-interest goals. The VN architecture yet remains crucial to the
orchestration of the ensemble, whether the master is a ruling dictator or simply a discreet
facilitator.
Before taking a closer look at the characteristics of binary logic gates forming the
ALU circuitry, it is worth considering the Turing machine (TM), which was described
in Chapter 7. To recall, the generic TM architecture, which is illustrated in Fig. 7.1,
consists of a bidirectional tape of infinite length, and a head, which is able to read and
write bits or symbols onto the tape. The TM is set into motion according to a stack of
instructions, called an “action table.” This action table is the program from which the
tape input data are processed bit by bit (or symbol by symbol), resulting in the generation
of output data, which are recorded on the tape. It includes a “halting instruction,” which
forces the machine to halt on completion of the task. The tape is a memory of infinite
size, which puts no restriction as to the complexity of the task, the corresponding
computing algorithm and the amount of data to be processed. Finally, a universal Turing
7
See http://en.wikipedia.org/wiki/Central_processing_unit.