Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

# What Is an Arithmetic Logic Unit?

An Arithmetic Logic Unit (ALU) is the core of a computer's processing power, executing mathematical and logical operations essential for tasks from simple calculations to complex problem-solving. It's the brain within the brain, where numbers meet decisions, shaping the efficiency of every command. Intrigued by how this critical component influences computing performance? Let's examine its impact on technology's evolution.
C.B. Fox
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.

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

anon1006295

The ALU may be a necessary component, but easily replaced by pre-computed cheat-sheets of logic and arithmetic. For example: The IBM1620 CADET (Can't Add Doesn't Even Try) could do real logic, but addition and multiplication were entirely faked by lookup tables. You will find FPGAs to be chock full of small programmable LUTs. Logic replaced by a four or eight way multiplexer, fed a truth table representing the desired function. Main challenge of any ALU will be quickly propagating carry for operations larger than fit a reasonable table.

Mammmood

@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.

Charred

@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.

hamje32

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.