COLLECTED BY
Organization:
Internet Archive
The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the
Wayback Machine.
The seed for this crawl was a list of every host in the Wayback Machine
This crawl was run at a level 1 (URLs including their embeds, plus the URLs of all outbound links including their embeds)
The WARC files associated with this crawl are not currently available to the general public.
The Wayback Machine - https://web.archive.org/web/20170508194613/http://cs.umd.edu/class/sum2003/cmsc311/Notes//Comb/onebitALU.html
How to Create a 1-bit ALU
Introduction
One lesson about building hardware is that we can build big components
out of small ones. Thus, by using k full-adders, we can create a k-bit
ripple carry adder which sums two k bit numbers.
We can use the same idea to build an ALU. We can perform operations
on two k-bit numbers by chaining together k one-bit ALUs.
This turns out to be much easier than you might expect.
Operations for an ALU
ALU perform basic operations on up to two numbers. We imagine that
ALUs operate on two 32-bit representations. These can be built up from
32 1-bit ALUs.
Here's a list of operations we might perform:
con1 |
con0 |
Operation |
0 |
0 |
xi + yi +
ci-1 |
0 |
1 |
xi AND yi |
1 |
0 |
xi OR yi |
1 |
1 |
xi |
The operations are:
- adding the ith bit of x and y, and the
carry in, ci-1 (to be used for adding),
- bitwise ANDing xi and yi
- bitwise ORing xi and yi
- selecting xi
You can imagine adding other operations to make the ALU more
useful. The point of this 1-bit ALU is to show how you can handle
at least two operations.
To implement this 1-bit ALU, we will have the following inputs
and outputs:
- Three data inputs: xi , yi,
(which are the ith bit of two k-bit numbers, x and
y), and ci - 1, which is the carry in.
- Two control inputs: con1, con0.
We call them con1 instead of c1 to
avoid confusion with the carry bits.
- Two outputs: zi and ci, the
carry out.
The circuit is easy enough to implement. Since we want to choose
between one of four possible operations, the obvious choice is to use a
4-1 MUX.
Here's the circuit diagram of a one-bit ALU.
Creating a 3-bit ALU
Here's how you would put three 1-bit ALU to create a 3-bit ALU.
Notice that it looks just like a 3-bit ripple carry adder.
The diagram isn't quite complete. In particular, we need to add
the control bits con1 and con0, on
the outside of the black box, then hook them up to each of the 1-bit
ALU. As an exercise, redraw the diagram, and add these control bits
in.
Summary
We can design a k-bit ALU, similar to the way we design
a k-bit ripple carry adder. We build it from a 1-bit version.
In this case, we create a 1-bit ALU, built up from a MUX, adders,
and any gates needed to perform the operation.
Then, we hook up k 1-bit ALUs together to create a k-bit ALU.