General Question

PhiNotPi's avatar

How do I build my own computer/processor?

Asked by PhiNotPi (12686points) August 28th, 2011

I want to build (or at least design) my own simple computer. Input and output are going to be extremely simple, possibly a grid of LEDs for output and switches for inputs. This includes building a very simple CPU from smaller components, maybe 7400 series TTL chips. How would I design such a computer? The most difficult part is probably the CPU, so how would I build one?

I know that the answer depends on what I want the computer to do. I want it to be able to do:
simple math (+, -, *, /)
binary operations (and, or, not)
run simple programs from ROM (ROM consists of switches)
take a one byte number from input, with an “enter” switch
use certian memory locations as output/input

I know the answer is complicated, so all I want is a link to where I might learn more about how to do this.

Observing members: 0 Composing members: 0

9 Answers

Response moderated
Response moderated
XOIIO's avatar

There was an ariticle on hackaday.com where someone made a computer from scratc, and it was about the same size as a regular one, all little chips, and it could do less than the Apple IIe

gasman's avatar

You want to build a CPU using logic gates?? Back to the 1970s! That’s a tall order, considering that even the earliest humble microprocessors had thousands of logic gates and now have millions. You’ll need to construct registers, latches, flip-flops, half-adders, full-adders, status flags, and all manner of clever intermediate structures—a densely populated circuit board just to emulate the humblest 8-pin CPU. Not that it isn’t a worthy project…

Might I suggest you focus on interfacing something like an Arduino, Propeller, or even a raw PIC chip (in other words, a modern embedded controller) as the centerpiece of your computer, then branch outward with simple digital logic from there for the peripherals? You can still assemble TTL chips like so many Legos to form useful circuits. (Been there, done that!)

Or perhaps just build yourself a one- or two-bit processor, implementing all the basic logic functions (not, and, or, add, etc) once or twice—but not 8-fold or 16-fold or more like a real CPU. Forget about multiplication—the earliest commercial chips lacked this function as it is readily handled in software. I’ve hand-written my own floating point multiply, divide, and binary-to-decimal conversion, almost 30 years ago. Once again not for the faint of heart & I wouldn’t do it again.

You’ll also need to construct a digital oscillator to serve as a clock, plus tons of logic to drive the whole fetch-and-process cycle of digesting your software byte by byte.

Back in the day, I learned from books that are now probably out of print. Look for early stuff by Don Lancaster (aka “hardware hacker”) such as TTL Cookbook and CMOS Cookbook. Other authors to search for are Osbourne and Selby. Sorry I have no up-to-date references.

I admire your ambition! Like building an aircraft carrier from toothpicks.

PhiNotPi's avatar

@gasman Okay, I’ll get rid rid of multiplication and division, which can be simulated with repeated addition and subtraction. I can also replace AND, OR, and NOT with a NAND, a universal logic gate. I will reduce it to as few bits as possible, but I really don’t understand how to make a functional one or two-bit computer. Also, I’m not sure that I will end up actually building the computer. As for my inspiration, it would be this.

gasman's avatar

I wasn’t suggesting that multiplication is repeated addition (although, even farther back in the day, I built an integer multiplier out of simple counters that did just that!). Instead you use a binary multiplication, which requires shifting and adding and carrying but not counting.

Learns the details of the one-bit adder (which produces sum and carry bits). For 8-bit addition & subtraction you need 8 of them, cascaded right-to-left during a single clock cycle. Don’t forget you’ll need left-right shift registers.

dabbler's avatar

Yikes ! That was a college-level assignment back in 1979.
@gasman is pointing the right direction… CMOS & TTL and watch those clock signals.

You might want to get the spec sheets for an existing 4-bit processor (machine controller) and aim for emulating that with discrete circuits.

The task will certainly help you appreciate the complexity and sophistication of contemporary quad-core CPU’s with oodles of registers and big cache RAM.

Nadir's avatar

It sounds like this was a university project, in which case this answer is a bit late for the person asking. However for anyone still finding this question via google…

The book you are probably looking for is “Digital Computer Electronics” by Albert Malvino. It is out of print but Amazon has many used copies. Some textbook sharing sites also have pdf copies if you do some searching. This will show you how to build the SAP-1 Simple As Possible computer of of 74LS TTL logic chips. Better copies of the actual schematics can be found here:
SAP-1 Schematics

From there you can expand and adapt the design to build a simple 4-function calculator.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther