You will all no doubt be familiar with the 74 series logic integrated circuits, they provide the glue logic for countless projects. If you look back through old listings of the series you’ll find alongside the familiar simple gates a host of now obsolete chips that reveal their roots in the pre-microprocessor computer industry of the late 1960s, implementing entire functions that would now be integrated.
One of the more famous of these devices is the 74181, a cascadable 4-bit arithmetic logic unit, or ALU. An ALU is the heart of a microprocessor, performing its operations. The 74181 appeared in many late-60s and early-70s minicomputers, will be familiar to generations of EE and CS students as the device they were taught about ALUs on, and can now be found in some home-built retrocomputers.
[Ken Shirriff], doyen of the integrated circuit teardown, has published a piece taking a look at the 74181, in particular at its logic functions and the reason for some of them that are rather surprising. As well as the normal logic functions, for example the chip can do “(A + B) PLUS AB“. Why on earth you might think would an ALU need to do that?
The answer lies in the way it performs carrying while adding, a significant speed-up can be achieved over ripple carrying along a chain of adders if it can be ascertained whether a bit addition might generate a carry bit. He explains the function required to perform this operation, and suddenly the unusual extra function makes sense. Addition is transformed from a serial process to a parallel one, with a consequent speed increase.
It’s one of those moments in which you have to salute those logic designers from an era when on-chip real-estate was costly and every ounce of speed had to be teased from their designs. Give it a read, and have a go at the interactive 74181 simulator further down [Ken]’s page. We learned something from the article, and so may you.
We brought you the first part of [Ken]’s 74181 investigations earlier in the year. If you would like to see a 74181 in action, take a look at this 4-bit 74 logic single board computer.
There’s also a carry look-ahead generator, the 74182, which speeded up carry propagation over 4 x 74181s, to make a faster 16 bit ALU. In 1972 I got as far as wiring that much up, but never did find time to go much further with a DIY CPU design. The board is still around here somewhere.
Find it, write it up, post it to the Hackaday tips line! We’d love to see it.
Many of the early minicomputers had either a 74181 or an AMD 2901 bit-slice design. The Data General NOVA 4C had 2901s.
Xerox PARC’s Alto used the 74181 for certain. https://en.wikipedia.org/wiki/Xerox_Alto
I suspect that these posts only attract old EE farts by sparking nostalgic feelings. Speaking from experience… these posts work just like fly paper for me.
There is a decent-sized group of retrocomputing afficionados not fueled by nostalgia alone. These circuits contain interesting, pretty elegant solutions for problems of the day that some see as inspiring.
Yup, agreed. I’m building a “retro”-ish (computing power-wise) computer on gate-level (end result will be 74xx gates, right now purely design stage), so I like it when HaD posts stuff on logic-gate level stuff like this, low-level programming or otherwise “retro”/simplified computing topics.
Mr Benchoff, please keep these coming! :)
Also forgot to add I’m in my early twenties, so not an “old fart” by any means. I actually love reading about mainframe era to 80s/early 90s stuff.
you need to seek out some of the early miniframes like Cromemco. I was lucky enough to get my hands on one back in the early 90’s because a business auction had no idea what it was and I bought it at metal scrap price. Hacked the root password and had a 16 terminal miniframe computer in the house where I started to learn a Unix. it had a HUGE hard drive with a clear case in the bottom Luckily it had a emergency repair mode that you could short a jumper on the board to force it to boot to single user mode, I then found the /etc/passwd file and exported it over serial to a zenith laptop, edited it to have a new hash for root that was a known password and then sent it back. removed the jumper and rebooted, BOOM I AM ROOT!…
I then played with the old database as well as the financial software that was still on it. when I was lucky enough to discover that whoever managed the device read all the OS install floppies into binary images on the drive. I simply did a DD -if /images/floppyX of /dev/fd0 and had a full set of not only the install disks, but the DB install disks and the Development environment that was not even installed. Serial terminals ROCKED!
And some people know it really isn’t turtles all the way down and just want to know what the turtles are standing on.
As an old fart, I absolutely LOVE the idea of implementing CPUs in FPGAs instead of by wirewrapping boards full of DIPs.
Finally, the imaginary HDL I learned in college is real, and can be used to create actual hardware!
PAL/CPLD/FPGA were all originally meant to get your stuff short-run tested prior to a high volume ASIC run.
Since the FPGA were eventually used in production hardware, there are now versions that are hybridized with built in flash and ARM cpus.
There are even free Verilog to gcc C compilers around that will auto-generate modular logic testing software source code. I’ve been contemplating how complex exporting KiCAD tagged-symbolic logic symbols with net-lists into a form the logic compiler understands… ;-)
I looked at this and thought it would be a good way to learn schematic entry. Then when I looked at the schematic I thought VHDL is still easier. I guess I will never learn schematic entry which is no loss because with the complexity of modern CPLDs/FPGA schematic entry is close to useless anyway.
It would be interesting to scale this to 8 bits though, through in some registers and addressing and see what you get.
I went through my junk box yesterday and found 100 Xilinx XC9536XL’s (36 registers) and this looks like an experiment made for little CPDs like that.
I bought a bunch of Xilinx XC9536 and XC9572 chips about a decade ago. I think I even have a few bigger chips, but not many. I’ve always really enjoyed logic design, and I got the chips specifically because the software supported schematic entry. I honestly don’t know the first thing about any of the languages used for CPLDs and FPGAs though.
For small chips there is PALASM and CUPL languages which are variants of Boolean expressions. These were often used in the era of PLA/PAL/GAL. The mainstream IDEs — Altera Quartus and Xilinx ISE both support VHDL and Verilog and as far as I know they both also support schematic entry.
There are some new players in the field as well. I saw one that is intended to be very ‘C’ like.
I still have two of these beautiful IC’s. My electronics teacher dared us to create our own out of OR’s, AND’s, and the N and X varieties. I along with 2 other techs built one in 74xx and 4xxx logic. Needless to say, it worked, and could do 4-bit math easily. It’s a wonder, in the old days (circa ’85), that they used SX processors (that if you needed extra “math functions”), that you would need the “1 digit more Math Co-processor” as well. :) I miss those days. -KC8KVA
And TTL logic isn’t obsolete. Not by an even bigger chance.
The 74181 and 74LS181 are still available on aliexpress for AU$0.90 ea, https://www.aliexpress.com/item/4001122320575.html?spm=a2g0o.productlist.main.23.7d7b14f6eSQm2x&algo_pvid=49054eee-1f78-40c2-b914-3a4ed55420fc&algo_exp_id=49054eee-1f78-40c2-b914-3a4ed55420fc-11&pdp_ext_f=%7B%22sku_id%22%3A%2210000014551939007%22%7D&pdp_npi=3%40dis%21AUD%211.07%210.9%21%21%21%21%21%40212248ba16780069535051401d06d3%2110000014551939007%21sea%21AU%21134799885&curPageLogUid=iqrdfVqmXMQZ