G22 Microproject DTE
G22 Microproject DTE
No
1 INTRODUCTION 1
2 SPECIFICATION 2
4 HIOW IR WORKS 6
5 METHODOLOGY 7-8
6 CONCLUSION 9
7 REFERENCE 10
INDEX
INTRODUCTION
The 74181 is a 4-bit slice arithmetic logic unit (ALU), implemented as a 7400
series TTL integrated circuit. Introduced by Texas Instruments in February 1970,[1] it was the
first complete ALU on a single chip.[2] It was used as the arithmetic/logic core in the CPUs of
many historically significant minicomputers and other devices.
The 74181 represents an evolutionary step between the CPUs of the 1960s, which were
constructed using discrete logic gates, and today's single-chip microprocessor CPUs.
Although no longer used in commercial products, the 74181 is still referenced in computer
organization textbooks and technical papers. It is also sometimes used in "hands-on" college
courses to train future computer architects.
SPECIFICATIONS
The 74181 is a 7400 series medium-scale integration (MSI) TTL integrated circuit, containing the
equivalent of 75 logic gates[3] and most commonly packaged as a 24-pin DIP. The 4-bit wide ALU
can perform all the traditional add / subtract / decrement operations with or without carry, as well
as AND / NAND, OR / NOR, XOR, and shift. Many variations of these basic functions are
available, for a total of 16 arithmetic and 16 logical operations on two four-bit words. Multiply and
divide functions are not provided but can be performed in multiple steps using the shift and add
or subtract functions. Shift is not an explicit function but can be derived from several available
functions; e.g., selecting function "A plus A" with carry (M=0) will give an arithmetic left shift of
the A input.
The 74181 performs these operations on two four-bit operands generating a four-bit result with
carry in 22 nanoseconds (45 MHz). The 74S181 performs the same operations in 11
nanoseconds (90 MHz), while the 74F181 performs the operations in 7 nanoseconds (143 MHz)
(typical).
Multiple 'slices' can be combined for arbitrarily large word sizes. For example, sixteen 74S181s
and five 74S182 look ahead carry generators can be combined to perform the same operations
on 64-bit operands in 28 nanoseconds (36 MHz). Although overshadowed by the performance of
today's multi-gigahertz 64-bit microprocessors, this was quite impressive when compared to the
sub-megahertz clock speeds of the early four- and eight-bit microprocessors.
Circuit Diagram
COMPONENTS IN ALU
2.LOGIC UNIT
The logic unit is the second half of the ALU. Instead of mathematical operations, the logic
unit performs logical operations such as AND, OR, and XOR. In addition, it conducts
numerical tests. For instance, it determines whether or not the integer is negative. It also
regulates whether the ALU’s output is zero. In addition, it supports a variety of flags,
including overflow, zero, and negative. These flags assist us by identifying if the output is 0
or not and which input is greater than another.
3.BUILT-IN STORAGE
The ALU typically has storage locations for input operands, adding operands, the cumulative
result (saved in an accumulator), and shifting results. Gated circuits control the movement of
bits and the tasks performed on them within the ALU’s subunits. These gates are regulated by
a sequential logic unit that employs a specific algorithm or sequencing for every operation
code. In the arithmetic logic unit, division and multiplication are accomplished using a
sequence of additions, subtractions, and shifts.
4.THE ACCUMULATOR
In a computer’s ALU, the accumulator is a buffer that stores intermediary arithmetic logic
unit outcomes. During the processing cycles, it stores data or the findings of an operation.
During every ALU operation, the accumulator may contain any of the operands. For instance,
if we wanted to add two bytes, one would be placed in the accumulator and the second in
memory or a general-purpose register.
5.GENERAL-PURPOSE REGISTER
A register functions as a fast memory for receiving, storing, and transmitting information and
instructions, which the ALU (and, therefore, the CPU) will require immediately. General
purpose registers comprise additional CPU registers employed whenever data or a memory
address is necessary. These registers serve as storage for operands and pointers. Notably, a
numerical value used as input for an action is called an operand, and a pointer indicates
instructions.
6.DATA BUSES
A data bus is utilized to transport data from the memory to the registers and from the registers
to the memory. A fundamental ALU consists of three parallel data buses containing two entry
operands (X and Y) and one output. Every data bus is a collection of signals carrying a single
binary integer. Generally, the total number of signals composing each bus and the exterior
circuit encircling the ALU are similar (such as the enclosing CPU).
7.CIRCUIT OPERATIONS
The circuit is the last and most important component of the ALU. The ALU is a combined
logic circuit, meaning its outputs respond asynchronously to input changes. In normal
functioning, the ALU inputs receive steady signals. When sufficient time has elapsed (called
the “propagation delay”), the outcome of the operation is transferred to the output register.
External circuitry attached to the ALU is accountable for maintaining input signal stability. In
addition, adequate time is allowed for the signal to propagate before the findings are
evaluated.
HOW IT WORKS :
The 74181 ALU (arithmetic/logic unit) chip powered many of the minicomputers of the
1970s: it provided fast 4-bit arithmetic and logic functions, and could be combined to handle
larger words, making it a key part of many CPUs. But if you look at the chip more closely,
there are a few mysteries. It implements addition, subtraction, and the Boolean functions
you'd expect, but why does it provide several bizarre functions such as "A plus (A and not
B)"? And if you look at the circuit diagram (below), why does it look like a random pile of
gates rather than being built from standard full adder circuits. In this article, I explain that the
74181's set of functions isn't arbitrary but has a logical explanation. And I show how the
74181 implements carry lookahead for high speed, resulting in its complex gate structure.
The 74181 chip is important because of its key role in minicomputer history. Before the
microprocessor era, minicomputers built their processors from boards of individual chips. A
key part of the processor was the arithmetic/logic unit (ALU), which performed arithmetic
operations (addition, subtraction) and logical operations (AND, OR, XOR). Early
minicomputers built ALUs out of a large number of simple gates. But in March 1970, Texas
Instruments introduced the 74181 Arithmetic / Logic Unit (ALU) chip, which put a full 4-bit
ALU on one fast TTL chip. This chip provided 32 arithmetic and logic functions, as well as
carry lookahead for high performance. Using the 74181 chip simplified the design of a
minicomputer processor and made it more compact, so it was used in many minicomputers.
Computers using the 74181 ranged from the popular PDP-11 and Xerox Alto minicomputers
to the powerful VAX-11/780 "superminicomputer". The 74181 is still used today in retro
hacker projects.1
The 74181 implements a 4-bit ALU providing 16 logic functions and 16 arithmetic functions,
as the datasheet (below) shows. As well as the expected addition, subtraction, and Boolean
operations, there are some bizarre functions such as "(A + B) PLUS AB".
METHODOLOGY :
Arithmetic functions
The 74181's arithmetic operations are a combination of addition, subtraction, logic
operations, and strange combinations such as "A PLUS AB PLUS 1". It turns out that there is
a rational system behind the operation set: they are simply the 16 logic functions added to A
along with the carry-in.2 That is, the arithmetic functions are: A PLUS f(A,B) PLUS carry-in.
For example, If f(A,B)=B, you get simple addition: A PLUS B PLUS carry-in. If f(A,B) =
NOT B, you get A PLUS NOT B PLUS carry-in, which in two's-complement logic turns into
subtraction: A MINUS B MINUS 1 PLUS carry-in.
Other arithmetic functions take a bit more analysis. Suppose f(A,B) = NOT (A OR B). Then
each bit of A PLUS f(A,B) will always be 1 except in the case where A is 0 and B is 1, so the
result of the sum is A OR NOT B. Even though you're doing addition, the result is a logical
function since no carry can be generated. The other strange arithmetic functions can be
understood similarly.3
Thus, the 16 arithmetic functions of the 74181 are a consequence of combining addition with
one of the 16 Boolean functions. Even though many of the functions are strange and probably
useless, there's a reason for them. (The Boolean logic functions for arithmetic are in a
different order than for logical operations, explaining why there's no obvious connection
between the arithmetic and logical functions.)
BINARY ADDITION
The straightforward but slow way to build an adder is to use a simple one-bit full adders for
each bit, with the carry out of one adder going into the next adder. The result is kind of like
doing long addition by hand: in decimal if you add 9999 + 1, you have to carry the 1 from
each column to the next, which is slow. This "ripple carry" makes addition a serial operation
instead of a parallel operation, harming the processor's performance. To avoid this, the 74181
computes the carries first and then adds all four bits in parallel, avoiding the delay of ripple
carry. This may seem impossible: how can you determine if there's a carry before you do the
addition? The answer is carry lookahead.
Carry lookahead uses "Generate" and "Propagate" signals to determine if each bit position
will always generate a carry or can potentially generate a carry. For instance, if you're adding
0+0+C (where C is the carry-in), there's no way to get a carry out from that addition,
regardless of what C is. On the other hand, if you're adding 1+1+C, there will always be a
carry out generated, regardless of C. This is called the Generate case. Finally, for 0+1+C (or
1+0+C), there will be a carry out if there is a carry in. This is called the Propagate case since
if there is a carry-in, it is propagated to the carry out.4 Putting this all together, for each bit
position you create a G (generate) signal if both bits are 1, and a P (propagate) signal unless
both bits are 0.
The carry from each bit position can be computed from the P and G signals by determining
which combinations can produce a carry. For instance, there will be a carry from bit 0 to bit 1
if P0 is set (i.e. a carry is generated or propagated) and there is either a carry-in or a generated
carry. So C1 = P0 AND (Cin OR G0).
Higher-order carries have more cases and are progressively more complicated. For example,
consider the carry in to bit 2. First, P1 must be set for a carry out from bit 1. In addition, a
carry either was generated by bit 1 or propagated from bit 0. Finally, the first carry must have
come from somewhere: either carry-in, generated from bit 0 or generated from bit 1. Putting
this all together produces the function used by the 74181: C2 = P1 AND (G1 OR P0) AND
(C0 OR G0 OR G1).
CONCLUSION
While the 74181 appears at first to be a bunch of gates randomly thrown together to
yield bizarre functions, studying it shows that there is a system to its function set: it
provides all 16 Boolean logic functions, as well as addition to these functions. The
circuitry is designed around carry lookahead, generating G and P signals, so the result
can be produced in parallel without waiting for carry propagation. Modern processors
continue to use carry lookahead, but in more complex forms optimized for long words
and efficient chip layout.
REFRENCES
1.https://en.wikipedia.org/wiki/74181
2. http://www.righto.com/2017/03/inside-vintage-74181-alu-chip-how-it.html
3. https://www.igelectronics.com/products/a13d88f3c5/1726810000000211015
4. https://hackaday.com/tag/74181/