﻿ Arithmetic Logic Units (ALU): An Introduction
Note #4
Arithmetic Logic Units (ALU): An Introduction

An arithmetic unit enables computers to perform binary arithmetic. It is one of the most important parts of a CPU (Central Processing Unit). An arithmetic unit which also performs logical operations is commonly referred to as an ALU (Arithmetic Logic Unit).

Understanding the machine

If you could take a computer and rip out its heart - what would it look like? This might sound like a strange notion, but is it something we could actually do? Or does the question even make sense?

It's hard to even conceptualise what a computer is these days. Most of us have one form or another sitting in our pockets, strapped to our wrists, or sitting on our desk. They all look completely different and are used for various purposes - do they even work in the same way?

Well, it may surprise you that these devices all use the same fundamental mechanisms to operate. They all stem from the same primordial digital DNA and they all share the same perpetual heartbeat - even if some beat faster than others.

It may also shock some to learn that computers are just dumb machines controlled through a stream of binary instructions being repetitively manipulated by soulless mechanisms. There really is nothing magic or smart about them - regardless of what Siri might tell you.

By definition, a computer, or ‘computational machine’, is a piece of hardware that performs general purpose calculations based on a set of stored instructions. In slightly simpler terms, a computer is a binary calculator on steroids - and one which operates through a repetitive process called the 'fetch-decode-execute' cycle.

Perpetual mechanisms

Fetch-decode-execute refers to a computational process that continually fetches instructions from a memory store, decodes them into operations and executes them to perform a calculation. And it is these simple steps which give rise to the complex (and seemingly magical) behaviours we expect from modern computing machines!

The fetch-decode-execute process can be further explained by linking each cycle step (FETCH / DECODE / EXECUTE) with three hardware subsystems: a memory unit, a control unit, and an arithmetic unit.

FETCH (performed by a memory unit)
A memory unit is the part of a computational machine that contains the machine instructions or data for performing general purpose calculations. This subsystem allows stored instructions or data to be accessed or fetched during a program’s execution.

DECODE (performed by a control unit)
The control unit is responsible for automating and sequencing the fetch-decode-execute cycle – you can think of it as a system ‘conductor’. It also decodes instructions and makes sure the correct system operations are consequently performed.

EXECUTE (performed by an arithmetic unit)
An arithmetic unit is a hardware subsystem that performs arithmetic operations on binary inputs. The simplest arithmetic units execute binary addition and subtraction. More complex AUs can perform multiplication, division and logical bitwise operations. However, those more complex AUs are usually referred to as ALUs: 'Arithmetic Logic Unit'.

A short history of Arithmetic Logic Units

The idea of computation being made up from discrete subsystems working together to create complex behaviours isn't a 20th century idea. In fact, stored-program machines were being conceptualised by Charles Babbage over 100 years before Alan Turing's famous formalisation of a 'Universal Turing Machine' in the 1930s.

A little know book 'Fast than Thought' (1953) by B.V.Bowden beautifully describes Babbage's conceptualisation of computation which includes the notion of a control unit, a memory unit and an arithmetic unit! In a nice nod to the mechanical context of an arithmetic unit at the time, Babbage referred to this subsystem as 'The Mill'.

The theoretical foundations of computation saw the light of day through the construction of early digital computers. Machines such as the MOSAIC computer, which ran its first program in (circa) 1953, comprised of over 6,480 electronic valves and occupied the space of four rooms! The image below shows a picture of its 'Arithmetic Rack', which was one of the earliest arithmetic units. It operated at the core of the computer until the machine was decommissioned in the early 1960s. (Note here the control rack too. The memory 'store' was housed in a separate room).

In the exploration of early digital computers it’s also worth mentioning EDSAC 2 (operational 1958), which was the first computer to have a microprogrammed control unit. For seasoned ALU spotters it is worth visiting the 'Centre for Computing History' in Cambridge which houses a part of the Arithmetic Logic Unit from this machine:

From the 1960s computers were shrinking in size considerably thanks to the invention of integrated circuits which replaced the vacuum tube technology used in early computers. In 1970 Texas Instruments introduced the seminal 74181 TTL IC - a 4-bit ALU - which simplified the design of minicomputers. It performed arithmetic operations (addition and subtraction) and logical operations (AND, OR, XOR). It was to become pivotal in the history of ALU design and computing technology, being used in famous computers such as the PDP-11.

Many regard the 74181 TTL IC as a classic chip - even if it is no longer manufactured. Its demise, however, signals the rise of CPUs, where the subsystems of computers are miniaturised and subsumed in the silicon slices of modern microprocessor technology.

The S1-AU Mk1: A 4-bit Arithmetic Unit

Today you can no longer actually see or hold a modern ALU in your hand. And the simple mechanisms which drive everyday computation are now being lost and forgotten by the march of miniaturisation! This is why, though our DIY Electronic Kits, ARITH-MATIC aims to revive the physical and visible connections we once had with the long lost predecessors of modern digital computing.

Our flagship kit, the S1-AU Mk1, enables you to build your own arithmetic unit and gives a practical insight into the fundamental thinking that engineers, scientists and hobbyists all explored in the earlier days of the digital computer revolution.

Note by ARITH-MATIC
November 2018.

To find out more about the S1-AU Mk1 please visit our DIY Electronic Kits page.

You might also like:
Note #3
Note #6
Note #7
Explore our DIY Electronic Kits:
coming soon
£49.95in stock
in development