What Is an Arithmetic Logic Unit?

C.B. Fox

An arithmetic logic unit is the part of a computer’s central processing unit (CPU) that allows the computer to make numerical calculations and logical decisions. Input comes into one of these units through a specific channel and passes through a number of circuits that complete the necessary computations. Once the information has been processed according to the instructions of the program, it is returned to the computer’s memory in its new form. Not all computers combine math and logic functions into one unit, though this is a common configuration.

Man holding computer
Man holding computer

Boolean functions are used in the logic component of the arithmetic logic unit. Computers use these functions to test information in order to make logical decisions. Subjecting information to these logic tests allows the unit to make the requested alterations to data. In order to make changes to data, the unit receives both the data and the instructions, then performs the requested task before sending the data back to the computer’s memory.

The arithmetic part usually performs simple addition and subtraction operations. More complex mathematical functions, such as division and multiplication, are often performed by completing a series of subtractions or additions. This unit can also make comparisons between different values.

The computer’s memory is often accessed by the arithmetic logic unit. This memory, which is often referred to as random access memory, or RAM, is always in a state of flux. This happens because the unit accesses the memory and makes changes to it frequently in order to follow instructions given by various programs.

There are many channels that information can pass through once it has entered this part of the CPU. Gates between various parts of the unit stop information from being processed while the unit is performing the necessary tasks, such as altering the information or checking it against its Boolean logic function. These circuits are quite complex and involve the use of many gates.

In some cases, the arithmetic and logical functions are divided up and processed in two discrete central processing unit components, an arithmetic unit and a logic unit. Many computers also contain multiple arithmetic logic units that can complete a variety of functions quickly or, in some cases, simultaneously. Dividing these processes up requires more resources and space in the CPU, though it can make the processes run more smoothly.

You might also Like

Discussion Comments


@Charred - I believe that they have this thing called a FPU which is a floating point unit. From what I understand it has some additional architecture to do the floating point operations, in addition to the ALU itself.


@hamje32 - I tried playing with assembly language once but I gave up after a few tries. I decided to stay with Java.

But as for the ALU, how does it do the floating point operations? I thought it only did basic integers.


I read a book on assembly language computer programming once. Assembly language is a low level language, certainly not as easy as BASIC.

But what I liked about it is that it had only a few commands, and most of those commands were for logical operations, adding, subtracting, dividing, multiplying and branching operations.

With these few commands you could write a program that would do anything – it would just take you a long time to do it.

Anyway, I recall reading that the Arithmetic Logic Unit was responsible for handling all mathematical and logic operations, which made up quite a bit of those early programs that I wrote.

You couldn’t directly access the ALU but it would step in when needed. It certainly is a very important piece of the CPU hardware; your software couldn’t function without it.

Post your comments
Forgot password?