We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Hardware

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Is an Arithmetic Logic Unit?

By C.B. Fox
Updated: May 17, 2024
Views: 19,665
Share

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.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.

Editors' Picks

Discussion Comments
By anon1006295 — On Feb 25, 2022

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.

By Mammmood — On Sep 12, 2011

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

By Charred — On Sep 12, 2011

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

By hamje32 — On Sep 11, 2011

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.

Share
https://www.wisegeek.net/what-is-an-arithmetic-logic-unit.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.