“Alternative for the 74LS181 ALU, built in One Square Inch
An ALU was designed with only 7 IC’s. Its functions are ADD, SUB, XOR, XNOR, AND, OR, A, B, NOT A. It has a fast carry output. It can also do a few less used functions similar to what the 74181 can do.
This ALU ( Wikipedia: ALU ) could be used as a building block of a homebrew CPU.
It has not many components. It happens to fit on a one square inch PCB !
It could have been made smaller, using IC’s that can only be soldered under a microscope, but it uses SO14 and SO16 IC’s that are much easier to mount.
The square PCB has two rows of header contacts, with GND and VCC in the corners. That should sound familiar. This is the I/O:
4 inputs A
4 inputs B
5 function select inputs
carry-in and carry-out
Unfortunately, together with the power lines it is 21 signals, just too much for the two 10-pin headers. So the carry-out was banned to an extra 2-pin header on the left side.
The carry-out is quite fast, the signal from carry-in has to pass only 2 IC’s (U2 and U7), giving a theoretical worst case propagation time of 23+17 = 40 nS (Texas Instruments datasheet, Vcc 4.5V, 25 degrees). It can be made faster by using a faster logic family.
The meaning of the 5 function inputs is given on the schematic (One of the logs shows how to reduce this to 3 signals). The function encoding is not compatible with the 181. Note that for subtraction, the carry input must be “1”, just as with the 181. For logic instructions, the carry input must be “0” (the carry output is always “0” for logic instructions).
The design has been successfully simulated in Logisim (the Logisim design is in the files section). It has also been built and it works great !
If you are interested in ALU design, check my DCTL Transistor ALU and the relay-based ALU in my RISC Relay CPU.
I will use the logs to explain the circuit (for best results, read the oldest log first).”