The Mechanism of The Arithmetic Logic Unit
The Mechanism of The Arithmetic Logic Unit
Volume 81 (2024)
1. Introduction
The Arithmetic Logic Unit (ALU) is a critical component of modern computers responsible for
performing both arithmetic and logical operations. It constitutes a fundamental building block of
computer processors, handling essential mathematical operations such as addition, subtraction,
multiplication, and division, as well as logical operations. The performance of the Arithmetic Logic
Unit directly impacts the overall speed and efficiency of the computer's operations.[1]
The concept of the ALU was notably introduced by John von Neumann in his report titled "First
Draft of a Report on the EDVAC." [2] Von Neumann recognized the necessity of an ALU within a
computer system to execute basic mathematical calculations. [3] He envisioned computers equipped
with specialized components dedicated to performing these essential operations efficiently.
A significant milestone in the evolution of ALUs occurred during the 1960s with the advent of
integrated circuit technology. Integrated circuits facilitated the integration of multiple electronic
components onto a single chip, leading to more compact and efficient ALUs. This technological
advancement enhanced the performance of ALU. Meanwhile, it reduced manufacturing costs
substantially. Moreover, it contributes to the widespread adoption and advancement of computers.
The 1960s witnessed a momentous milestone in the evolution of ALUs, marked by the advent of
integrated circuit technology. The integration of multiple electronic components onto a single chip
via integrated circuits resulted in more compact and efficient ALUs. This remarkable advancement
not only bolstered the ALU's performance but also significantly reduced manufacturing costs,
catalyzing the widespread adoption and advancement of computers.
The journey of the ALU towards modernity has been characterized by relentless improvement
since the 1960s. The development of processors propelled the ALU's capabilities beyond basic integer
arithmetic, gradually encompassing floating-point arithmetic, vector arithmetic, and other advanced
functions. [4]
This article fulfills its purpose of offering a detailed and accessible resource for beginners seeking
to understand ALU's internal structure and design. By leveraging established theoretical knowledge
and a practical approach, newcomers are aimed to be equipped with a comprehensive understanding
of ALU functionality. This essay mainly introduces the basic calculating system of ALU. Also,
involve some simple calculation by using logic gates and the figures of the calculating process would
97
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
be shown. The insights gained from this article can serve as a stepping stone for beginners to embark
on further explorations in computer architecture, empowering them to contribute to the exciting world
of modern computing.
This is a one-bit half-adder. It is called a one-bit half adder as the situation of adding the carry bit
from behind is not involved. According to the truth table, the number of inputs '0' means the absence
98
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
of the following component, otherwise, '1' is the presence of the following one. Therefore, the
equation of the S (self) as S=A'B+AB' =A XOR B (011&101), C (carry bit) as C=A*B= A And B,
can be concluded. Therefore, the equation can be summed as S=A'B+AB' =A XOR B (011&101), C
(carry bit) as C=A*B= A And B (111 only). Therefore, two logic gates which are XOR Gate and
AND Gate perform the process of adding.
ii). one-bit-full adder
In the one-bit full adder, the situation of adding the carry bit from behind is involved. So, there are
two one-bit half adders are included in this particular full adder.
In the simulation model shown above, A and B is the object that is added and C-in is the carry bit
from behind. First, a one-bit half adder is used to add A1 and B1, and C1 and S1 are produced. S1 is
the new A (marked as A2) and the C-in is the new B (marked as B2). Another half-adder is used to
add A2 and B2 together. The final S is output directly, there are two carry bits to be exported, but
another half adder is not used another half adder to add because there are only three possible situations
(0,1/1,0/0,0) no carry bit generates. So Or Gate is used to connect these two Cs. Finally, the result is
produced (S and C-out)
iii). Four-bit full adder
A split is a component (quite like a branch) splitting a four-bit number into four 1-bit numbers one
by one, labeling them with 0, 1, 2, and 3, respectively. After that, four 1-bit half adders are used
starting from the right side of each of the numbers (A0 and B0). As these two figures are on the right
side of each number, there is no carry bit behind each of these, a one-bit half-adder for the addition
of A0 and B0 is used. The one-bit full adder can be used here. In this situation, the value of C-in is
constantly '0'. However, using a half adder may increase the efficiency of the whole adder, as well as
minimize the wastage of the component. [7]
But in the rest of the process, one-bit full adders are needed to perform the addition of the carry
bits from the right side of the figure. [8]
After adding A0 and B0, S0 (the first number of the answer counting from the right) and C-out1
(carry bit 1) are produced. Then the one-bit full adder is used to input three values which are A1, B1,
and C-out1. After that, the cycle runs for another two times. But in the last cycle, the value that C-out
99
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
produces is S4 (the digit of the answer that lies on the left side). Therefore, the answer is (S4 S3 S2
S1 S0).
According to the truth table provided in Table 3. The B-out (the situation when 0-1, 1 is borrowed
from the digit in front of the current one) and D (the difference between the two figures) could be
expressed as B-out=A'B+AB'=A Xor B, D=A'B=A' And B(using a Not Gate and an And Gate. So,
the series of logic gates should be assembled like Fig. 4.
100
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
The one-bit full subtractor consists of two one-bit half subtractors. After the first process of a one-
bit half subtractor, the situation of the existence of borrowing from the digit behind it is considered.
As shown above, after the first subtraction of A and B ( marked as A0 and B0), D0 and (B-out)0 are
produced, and then D0 and B-out play the role of A1 and B1 respectively. The D1 is the final result
output is the final result. There are two borrowing bits to be exported, but another half adder is not
used to add because there are only three possible situations (0,1/1,0/0,0) no carry bit is generated. An
Or Gate is used to connect these two (B-out)s. Finally, the result (D and B-out) is generated.
iii). four-bit full subtractor
utilized to transform. The first digit of the B in this subtractor must be '0' which means that B must
be positive. This is the limitation of this method. B in this subtractor can only range from 0 to 7. Then
the digit '0' is shifted to '1', and '1' is shifted to '0'. After that, the transformed number is added by 1.
Then another four 1-bit full adders are used to add A and the new four digits gained before. Finally,
the answer (S3 S2 S1 S0) is produced. {The two (C-out)s are excluded from the calculation, they do
not have meaning in this method of subtractor}
2.2.3 Multiplying
i). multiplier using logic gates
Table 5. Four-bit vertical multiplication
B3 B2 B1 B0
x A3 A2 A1 A0
A0B3 A0B2 A0B1 A0B0
+ A1B3 A1B2 A1B1 A1B0
+ A2B3 A2B2 A2B1 A2B0
+ A3B3 A3B2 A3B1 A3B0
+ (C-in)6 (C-in)5 (C-in)4 (C-in)3 (C-in)2 (C-in)1
P7 P6 P5 P4 P3 P2 P1 P0
102
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
And Gates are used to multiplicate. Because there are four times of multiplication in this
component, four And Gates should be used in each cycle. And the first result is exported as the digit
of the product, one by one. After three complete cycles, the result, as shown in Fig. 7, which is P0 to
P7, ranges from right to left.
ii). sequential logic multiplier
103
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
In this sequential logic divider (used for an eight-bit number divided by an eight-bit number). We
use three registers to store the values: two 16-bit registers for Divisor and Dividend (or Remainder)
and an 8-bit register for Quotient. Divider has a control to determine the instruction of subtraction.
First, the eight-digit dividend enters the right section of the register with other digits '0' and the eight-
digit divisor is placed into the left part of the register, with other digits '0'. Because the divisor shifts
to the right by one unit after each complete cycle (delete the first digit, which is '0', and add a '0' in
front of the whole number). The control is used to compare the value of the divisor and the dividend.
If the divisor is smaller than the dividend, then there is a '1' in the first digit of the present quotient.
After this cycle, the digits of the quotient shift to the left (delete the eighth digit counting from the
right and add a '0' at the right). [11]The same process is repeated until there's a '1' appearing at the
first digit of the Divisor. At this time, the value of the Dividend is the Remainder. Finally, the quotient
and the remainder are generated. s method is correct. [12]
104
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
105
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
106
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
Check
Dividend = 1001 = 9
Divisor = 0011 = 3
Quotient = 0011 = 3
Remainder = 0
1001/0011 = 0011 9/3 = 3
107
Highlights in Science, Engineering and Technology EMIS 2023
Volume 81 (2024)
4. Conclusion
In conclusion, ALU plays a vital role in performing mathematical calculations and logical
calculations as a fundamental component in modern computer structure. This article based on the use
of the simulation module, researches the basic logic of the four calculators and proves the feasibility
of the sequential logic multiplier and divider. The result of the research implicates: 1, All the
mathematical calculations used in the computer can be expressed using a series of logic gates. 2,
Sequential logic calculators have much higher automaticity than the normal combination of logic
gates and the efficiency of the ALU is much higher using the control. The result of the research is of
great value in improving the performance of the ALU, especially in fields such as the integration of
parallel processing and optimized circuitry design, revealing the utilization potentiality of the
sequential logic calculator. However, the research, which is based on the simulation module, lacks
the consideration of the practical application conditions. Therefore, in the future, we will base on the
practical appliances, analyze the actual operating mechanism of ALU under different practical
conditions, and promote the development of the ALU.
Author Contribution
All the authors contributed equally and their names were listed in alphabetical order
References
[1] Burks A W, Goldstine H H and von Neumann. Preliminary discussion of the logical design of an electronic
computing instrument, Institute for Advanced Study, Princeton, NJ, USA, 1946: 399-413.
[2] Von Neumann J. First Draft of a Report on the EDVAC. IEEE Annals of the History of Computing, 1993,
15(4): 27-75.
[3] T. Rhyne and N.R. Strader. A signed bit-sequential multiplier. IEEE Transaction on Computers, 1989,
38(9): 1328-1330.
[4] Bennett C. IBM J. Res. Develop, 1973, 17(6): 525-532.
[5] Jamil T. The complex binary number system. IEEE potentials, 2002, 20(5): 39-41.
[6] Bocker R P, Clayton S R, Bromley K. Electrooptical matrix multiplication using the twos complement
arithmetic for improved accuracy. Applied Optics, 1983, 22(13): 2019-2021.
[7] Cuccaro S A, Draper T G, Kutin S A, et al. A new quantum ripple-carry addition circuit. arXiv preprint
quant-ph/0410184, 2004.
[8] Thomsen M K, Axelsen H B. Parallelization of reversible ripple-carry adders. Parallel Processing Letters,
2009, 19(02): 205-222.
[9] Vieri C J. Reversible computer engineering and architecture. Massachusetts Institute of Technology, 1999,
pp. 96-100.
[10] Booth A D. A signed binary multiplication technique. The Quarterly Journal of Mechanics and Applied
Mathematics, 1951, 4(2): 236-240.
[11] Tocher K D. Techniques of multiplication and division for automatic binary computers. The Quarterly
Journal of Mechanics and Applied Mathematics, 1958, 11(3): 364-384.
[12] Freiman C V. Statistical analysis of certain binary division algorithms. Proceedings of the IRE, 1961,
49(1): 91-103.
108