Browse Definitions :
Definition

arithmetic-logic unit (ALU)

What is an arithmetic-logic unit (ALU)?

An arithmetic-logic unit is the part of a central processing unit that carries out arithmetic and logic operations on the operands in computer instruction words.

In some processors, the ALU is divided into two units: an arithmetic unit (AU) and a logic unit (LU). Some processors contain more than one AU -- for example, one for fixed-point operations and another for floating-point operations.

In computer systems, floating-point computations are sometimes done by a floating-point unit (FPU) on a separate chip called a numeric coprocessor.

How does an arithmetic-logic unit work?

Typically, the ALU has direct input and output access to the processor controller, main memory (random access memory or RAM in a personal computer) and input/output devices. Inputs and outputs flow along an electronic path that is called a bus.

The input consists of an instruction word, sometimes called a machine instruction word, that contains an operation code or "opcode," one or more operands and sometimes a format code. The operation code tells the ALU what operation to perform and the operands are used in the operation.

For example, two operands might be added together or compared logically. The format may be combined with the opcode and tells, for example, whether this is a fixed-point or a floating-point instruction.

The output consists of a result that is placed in a storage register and settings that indicate whether the operation was performed successfully. If it isn't, some sort of status will be stored in a permanent place that is sometimes called the machine status word.

In general, the ALU includes storage places for input operands, operands that are being added, the accumulated result (stored in an accumulator) and shifted results. The flow of bits and the operations performed on them in the subunits of the ALU are controlled by gated circuits.

The gates in these circuits are controlled by a sequence logic unit that uses a particular algorithm or sequence for each operation code. In the arithmetic unit, multiplication and division are done by a series of adding or subtracting and shifting operations.

There are several ways to represent negative numbers. In the logic unit, one of 16 possible logic operations can be performed -- such as comparing two operands and identifying where bits don't match.

The design of the ALU is a critical part of the processor and new approaches to speeding up instruction handling are continually being developed.

What type of functions do ALUs support?

In computer science, ALUs serve as a combinational digital circuit that performs arithmetic and bitwise operations on binary numbers. This is a foundational building block of arithmetic logic circuits for numerous types of control units and computing circuits including central processing units (CPUs), FPUs and graphics processing units.

CPU vs. GPU

Long before modern PCs, ALUs first helped to support microprocessors and transistors in the 1970s.

The following are a few examples of bitwise logical operations and basic arithmetic operations supported by ALUs:

  • Addition. Adds A and B with carry-in or carry-out sum at Y.
  • Subtraction. Subtracts B from A or vice versa with the difference at Y and carry-in or carry-out.
  • Increment. Where A or B is increased by one and Y represents the new value.
  • Decrement. Where A or B is decreased by one and Y represents the new value.
  • AND. The bitwise logic AND of A and B is represented by Y.
  • OR. The bitwise logic OR of A and B is represented by Y.
  • Exclusive-OR. The bitwise logic XOR of A and B is represented by Y.

ALU shift functions cause A or B operands to shift, either right or left, with the new operand represented by Y. Complex ALUs utilize barrel shifters to shift A or B operands by any number of bits in a single operation.

This was last updated in August 2021

Continue Reading About arithmetic-logic unit (ALU)

Networking
  • local area network (LAN)

    A local area network (LAN) is a group of computers and peripheral devices that are connected together within a distinct ...

  • TCP/IP

    TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect ...

  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

Security
  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

CIO
  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • project scope

    Project scope is the part of project planning that involves determining and documenting a list of specific project goals, ...

  • core competencies

    For any organization, its core competencies refer to the capabilities, knowledge, skills and resources that constitute its '...

HRSoftware
  • recruitment management system (RMS)

    A recruitment management system (RMS) is a set of tools designed to manage the employee recruiting and hiring process. It might ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

  • HR service delivery

    HR service delivery is a term used to explain how an organization's human resources department offers services to and interacts ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

Close