Quantcast

Forums | MacLife

You are not logged in.

#1 2008-03-30 9:25 pm

Fried Chicken
Member
From: Good question - keeps changing
Registered: 2003-11-17
Posts: 4557

WOW.... guy builds computer out of relays

Holy smurf!!!!  Some guy built a computer out of relays.
Aside from the mind blowing complexity of the machine, the amount of time to build a machine like this is just crazy.

I have absolutely no idea how computers work on an electron level.  Jesus, I can't imagine what kind of knowledge it takes to put something like this together.


http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USA.gif?t=1187025394 http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USAGermany.gif?t=1187033097http://i58.photobucket.com/albums/g279/FriedChicken_Sam/Germany.gif?t=1187025375

Just because something is legal, doesn't mean it's right.  Just because something is illegal, doesn't mean it's wrong.

Offline

 

#2 2008-03-30 10:19 pm

Miles
Now I fight for wisdom!
Administrator
From: Michigan
Registered: 2001-07-21
Posts: 4506
Website

Re: WOW.... guy builds computer out of relays

Fried Chicken wrote:

Holy smurf!!!!  Some guy built a computer out of relays.
Aside from the mind blowing complexity of the machine, the amount of time to build a machine like this is just crazy.

I have absolutely no idea how computers work on an electron level.  Jesus, I can't imagine what kind of knowledge it takes to put something like this together.

Yeah, that is pretty cool.  It's really not as complex as it looks, though.  Any graduate of a decent CS/CE bachelor's program should be able to build that (not that you need a college degree; a lot of geeks are self-taught).  It would take a ton of time, patience, and relays, though, so it's still impressive, and the flashing lights and clicking are fun.

Offline

 

#3 2008-03-30 10:39 pm

FutureDreamz
1.1.2.3.5.8.13.21.34.55
From: カナダ
Registered: 2007-01-07
Posts: 4511

Re: WOW.... guy builds computer out of relays

Too bad it couldn't run DOS, let alone Linux.
that would be super cool.


Thanks for clicking.

Offline

 

#4 2008-03-31 4:59 am

Temetka
High Priest
From: Behind the altar...
Registered: 2002-07-02
Posts: 2149

Re: WOW.... guy builds computer out of relays

This is pure awesome.

RE Knowledge: Some basic EE Theory and CS/CE Theory should get the ground work taken out of the way. Some diagrams and flowcharts will really help things out here as well. I would run it through some sort of simulator before I even touched a real relay.


Puddlemonkey said: My High Priest Rules! up
Jdude wrote: Anything in the name of Temetka, I suppose. love

Metallica wrote: Obey your Master!

Offline

 

#5 2008-03-31 5:11 pm

Ribtorus
Member
Registered: 2002-07-11
Posts: 13749

Re: WOW.... guy builds computer out of relays

I had to build an adder and divider in my HS electronics class. It was made entirelyout of discrete bi-polar transistors.

I have built some tube audio amplifiers, but my dream is to build a complete end-to-end tube mp3 player where the digital to analogue conversion, as well as the audio amplification is entirely vacuum tube technology.


when surrounded and left on Afghanistan's plains,
and the women come out to cut up what remains,
just roll to your rifle and blow out your brains,
and go to your god like a soldier...

Offline

 

#6 2008-03-31 5:23 pm

mo' ron
PS3 4 EVA
From: NC, USA
Registered: 2002-10-15
Posts: 14253

Re: WOW.... guy builds computer out of relays

This is how wozniak started out, and relays are a step up from the tubes the first univac and eniac were made out of.


What is the difference between Vista and OSX?
- Microsoft employees are excited about OSX.

Offline

 

#7 2008-03-31 5:58 pm

reece_james
TheLAD
From: Wollongong, Australia.
Registered: 2001-12-01
Posts: 3790
Website

Re: WOW.... guy builds computer out of relays

Temetka wrote:

This is pure awesome.

RE Knowledge: Some basic EE Theory and CS/CE Theory should get the ground work taken out of the way. Some diagrams and flowcharts will really help things out here as well. I would run it through some sort of simulator before I even touched a real relay.

I'm CS, but this is well beyond me. Yes I know the theory, and yes it is simple circuits, but this thing really needs a CE. I'm more likely to be able to build a compiler/language to use it than anything.

I've had a turning machine on my 'to build' list for a while now. Not only that, but my robot (almost done), my steam engine (almost done) and my magnetic piston engine (still on paper, but feasible).


Reece [/IMHO]
"All posts on the internet are postfixed by an invisible 'IMHO'", tito
Intel iMac CD 1.83Ghz, 2GB RAM, 17" + 20", 1160GB HD, 10.5.2.
MacBook CD 1.83Ghz, 2GB RAM, 60GB HD, 10.5.2.

Offline

 

#8 2008-03-31 6:36 pm

Fried Chicken
Member
From: Good question - keeps changing
Registered: 2003-11-17
Posts: 4557

Re: WOW.... guy builds computer out of relays

What I don't understand is how you can program something like this.... or teach a computer to recognize a programming language.

Which came first?  The chicken or the egg?


http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USA.gif?t=1187025394 http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USAGermany.gif?t=1187033097http://i58.photobucket.com/albums/g279/FriedChicken_Sam/Germany.gif?t=1187025375

Just because something is legal, doesn't mean it's right.  Just because something is illegal, doesn't mean it's wrong.

Offline

 

#9 2008-03-31 6:43 pm

mo' ron
PS3 4 EVA
From: NC, USA
Registered: 2002-10-15
Posts: 14253

Re: WOW.... guy builds computer out of relays

Fried Chicken wrote:

What I don't understand is how you can program something like this.... or teach a computer to recognize a programming language.

Which came first?  The chicken or the egg?

It's not that complicated actually...

I'm sure your college offers an "intro to computer organization" class that makes it easier to understand.

Also, you don't "teach" a computer to recognized a programming language, computers are built with the specific purpose of being programmed, and all programming languages are abstracts to the machine language (the literal 1s/0s that you have to clock in to make the computer do stuff). The hard work comes in with figuring out how to abstract a language like C to "compile" to a particular computer's machine language.

I think what made me "get" it was when I learned that in binary, adding 2 numbers together was merely an exclusive-or ( http://en.wikipedia.org/wiki/Bitwise_operation#XOR ) comparison, and the basis of probably most computer operations is adding things (whether positively, negatively, or recursively which gives you subtraction/division/multiplication). Things are more complex than this in modern processors, but you can build a computer just knowing this principle.


What is the difference between Vista and OSX?
- Microsoft employees are excited about OSX.

Offline

 

#10 2008-03-31 7:00 pm

Fried Chicken
Member
From: Good question - keeps changing
Registered: 2003-11-17
Posts: 4557

Re: WOW.... guy builds computer out of relays

mo' ron wrote:

Fried Chicken wrote:

What I don't understand is how you can program something like this.... or teach a computer to recognize a programming language.

Which came first?  The chicken or the egg?

It's not that complicated actually...

I'm sure your college offers an "intro to computer organization" class that makes it easier to understand.

Also, you don't "teach" a computer to recognized a programming language, computers are built with the specific purpose of being programmed, and all programming languages are abstracts to the machine language (the literal 1s/0s that you have to clock in to make the computer do stuff). The hard work comes in with figuring out how to abstract a language like C to "compile" to a particular computer's machine language.

I think what made me "get" it was when I learned that in binary, adding 2 numbers together was merely an exclusive-or ( http://en.wikipedia.org/wiki/Bitwise_operation#XOR ) comparison, and the basis of probably most computer operations is adding things (whether positively, negatively, or recursively which gives you subtraction/division/multiplication). Things are more complex than this in modern processors, but you can build a computer just knowing this principle.

I can sort of follow that... but how do you get the computer to, for example, find something in a piece of memory, or allocate memory.
I just took programming this year, but I cannot imagine how some of the most basic commands in java can be executed in a computer on the basic level.
How do you assign a computer to display a piece of text for example?


http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USA.gif?t=1187025394 http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USAGermany.gif?t=1187033097http://i58.photobucket.com/albums/g279/FriedChicken_Sam/Germany.gif?t=1187025375

Just because something is legal, doesn't mean it's right.  Just because something is illegal, doesn't mean it's wrong.

Offline

 

#11 2008-03-31 7:13 pm

dv
Negusa Negest
Moderator
From: Minneapolis, MN
Registered: 1999-08-30
Posts: 18098

Re: WOW.... guy builds computer out of relays

You're still thinking too high-level, fc.


"Now commences the process of cutting off the head, which generally takes from an hour to an hour and a half by an expert workman with a sharp blade." -Reuben Delano, Wanderings and Adventures

Offline

 

#12 2008-03-31 7:14 pm

mo' ron
PS3 4 EVA
From: NC, USA
Registered: 2002-10-15
Posts: 14253

Re: WOW.... guy builds computer out of relays

Fried Chicken wrote:

I can sort of follow that... but how do you get the computer to, for example, find something in a piece of memory, or allocate memory.
I just took programming this year, but I cannot imagine how some of the most basic commands in java can be executed in a computer on the basic level.
How do you assign a computer to display a piece of text for example?

It depends what you mean by "finding" memory, if you mean fetching memory, that's easy. If you mean actually finding memory, that's much more complex.

Just imagine you have 2 bits of memory. When you want to select the first one (address "0") you just have to wire that first bit/memory (let's assume you have your memory structure in place already) to an [AND] gate with 2 inputs, and on the second input, have your address line but with an inverter on it (so it "NOTs" whatever signal goes in to it). For the second bit of memory, you just wire the second bit to an [AND] gate, and wire your address line (assuming you're using a 1 bit memory addressing as opposed to modern 64 bit memory addressing) to that gate.

So when you're asking for address "0" the second bit has a "0" anded with something else, so <something> [AND] 0 is ALWAYS 0, but [NOT] 0 is 1, for for your first memory address you have the <memory> [AND] 1, which means your output will always be what's in memory. It's basically a multiplexer.

Also, an intro computer organization class is a bit different than programming. They're not usually too hard (at least mine wasnt), but they cover this kind of stuff well.

Last edited by mo' ron (2008-03-31 7:15 pm)


What is the difference between Vista and OSX?
- Microsoft employees are excited about OSX.

Offline

 

#13 2008-03-31 10:39 pm

Miles
Now I fight for wisdom!
Administrator
From: Michigan
Registered: 2001-07-21
Posts: 4506
Website

Re: WOW.... guy builds computer out of relays

mo' ron wrote:

This is how wozniak started out, and relays are a step up from the tubes the first univac and eniac were made out of.

Vacuum tubes are the step up from relays, I think you mean.

Offline

 

#14 2008-03-31 10:52 pm

Mr. T
Best of both worlds
From: omnipresent
Registered: 2002-04-02
Posts: 4231

Re: WOW.... guy builds computer out of relays

Fried Chicken wrote:

I can sort of follow that... but how do you get the computer to, for example, find something in a piece of memory, or allocate memory.
I just took programming this year, but I cannot imagine how some of the most basic commands in java can be executed in a computer on the basic level.
How do you assign a computer to display a piece of text for example?

It's all about abstraction.  I LOVE abstraction, and I love talking about it!!  It's a very simple yet profound concept that lets us do all the cool stuff we take for granted.

I'll start off by first noting that you're question doesn't really make sense (and then I'll use abstraction to explain why).  Allocating memory and displaying text are high-level constructs that depend most immediately on the kernel and relevant API's, respectively. In Java, it's actually more complicated -- you need to account for such things as the way objects are formed, dynamic dispatch, the bytecode interpreter -- lots of fun jargon.  But anyway, the CPU doesn't know what you mean by "allocating memory," for example.

The point is (this is where it gets cool) that for a particular Java command, you could (rougly) draw a tree-like structure denoting all the software and hardware constructs that the java command depends on.  Each level in the tree is a level of abstraction, and provides the interface its parent level depends on.  Rougly speaking, the lower levels of the tree consist mostly of hardware, while the higher levels consist of software interfaces.

For example, a piece of code in Java will depend on some other objects you might've written, which in turn depends on elements from the Java library, each of which depends on the JavaVM, each of which depend on various API's within the host OS, each of which depend on lower-level features of the OS, each of which depend on various machine instructions, each of which may depend on some microcode, which then depends on some hardware interface for said micro-ops.  And then you start getting into circuits.

The above example explains roughly how your Java command executes.  But a more general tree describing programming languages is a bit more enlightening.  We'll start with the CPU's instruction set.  The CPU contains operations for moving and comparing data (among other things).  With the appropriate sequence of bits, you can make the CPU do anything you want.  But the task of writing relatively simple programs in this way is difficult and quite time consuming -- writing a complex program like a modern video game is orders of magnitude beyond what mere mortals can accomplish.  To solve this problem, some smart people got the idea of using machine code to write an assembler.  This basically replaces cryptic sequences of machine code with helpful mnemonics and directives, and allows programmers to reference memory by "label" instead of having to worry about physical addresses.  The assembler made programming vastly simpler, while maintaining a 1:1 relationship with machine code.  Assembly code also introduced a crude concept of modularity -- writing somewhat more complex programs is easier when you can borrow previously-written code. 

Skipping some history, someone got the idea of using assembly to write even higher-level language compilers like C.  It's much faster and much easier to write a program in C compared to assembly.  This fact, combined with the improved modularity offered by C, made writing complex programs feasible.  As OS's began to mature, their API's became more sophisticated, further aiding the development of complex software.  In addition, the "virtual machine" paradigm meant that programmers could assume their programs had free-reign over a system's resources, without having to worry about conflicting with other programs (it also introduced threads).  At this level of abstraction, it's possible to write a modern 3D game (for example) using API's such as OpenGL.

However, progress did not stop here.  It was eventually discovered that programming could become further modularized with even higher-level languages via the object oriented paradigm.  C++, Java, C# and Objective-C are common examples of OOP languages.  The later three differ fundamentally from C++ in ways I won't bother to explain here, but the simple answer is they're even higher-level than C++.  Java is unique in that it compiles to bytecode rather than machine instructions (allowing one binary to run on any JavaVM machine); in this way, it is of higher abstraction than the other three.  Anyway, I hope I answered your question.  If not, hopefully this will answer someone else's!


while (1) {fork();}

Offline

 

#15 2008-03-31 11:03 pm

Aqua OS X
Shark Sandwich
From: Oakland, CA
Registered: 2000-06-05
Posts: 12669

Re: WOW.... guy builds computer out of relays

That computer should be pretty useful for fighting the Germans.

Offline

 

#16 2008-03-31 11:31 pm

Macskeeball
Member
Registered: 2002-02-07
Posts: 8014
Website

Re: WOW.... guy builds computer out of relays

As someone who has just started in CS this semester, I really appreciate that post, Mr. T. It was a good read.


tech writer for hire

Offline

 

#17 2008-04-01 12:06 am

Mr. T
Best of both worlds
From: omnipresent
Registered: 2002-04-02
Posts: 4231

Re: WOW.... guy builds computer out of relays

Thanks, that's exactly what I was going for.  Abstraction actually has a more technical form in the context of CS, whereas I gave a more general form.  But anyway, when I was a CS newbie, I kinda (roughly) figured some of this out in my first programming course.  I could "imagine" what the lower levels must look like in order for my programs to work (I really like programming, btw).  What I didn't immediately understand was the relationship between my programs and the OS -- we didn't have to know that, but I recall being quite curious at the time..


while (1) {fork();}

Offline

 

#18 2008-04-01 1:01 am

Fried Chicken
Member
From: Good question - keeps changing
Registered: 2003-11-17
Posts: 4557

Re: WOW.... guy builds computer out of relays

Mr. T, that was a very good post.  I kinda understand what's happening.  We started by physically manipulating the computers with (was it punchcards?), and then later we had the computer manipulate itself through an assembler.  This relied on the original underlying framework of the computer.  From that, we built über-assemblers, which relied on the other assemblers.

I guess that kinda make sense.  I think I will take a class in college about this, to satisfy my curiosity.


http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USA.gif?t=1187025394 http://i58.photobucket.com/albums/g279/FriedChicken_Sam/USAGermany.gif?t=1187033097http://i58.photobucket.com/albums/g279/FriedChicken_Sam/Germany.gif?t=1187025375

Just because something is legal, doesn't mean it's right.  Just because something is illegal, doesn't mean it's wrong.

Offline

 

#19 2008-04-01 1:07 am

reece_james
TheLAD
From: Wollongong, Australia.
Registered: 2001-12-01
Posts: 3790
Website

Re: WOW.... guy builds computer out of relays

Once again, excellent explanation Mr. T. Nice to see all information in one place.
Well done!


Reece [/IMHO]
"All posts on the internet are postfixed by an invisible 'IMHO'", tito
Intel iMac CD 1.83Ghz, 2GB RAM, 17" + 20", 1160GB HD, 10.5.2.
MacBook CD 1.83Ghz, 2GB RAM, 60GB HD, 10.5.2.

Offline

 

#20 2008-04-01 1:15 am

mo' ron
PS3 4 EVA
From: NC, USA
Registered: 2002-10-15
Posts: 14253

Re: WOW.... guy builds computer out of relays

Miles wrote:

mo' ron wrote:

This is how wozniak started out, and relays are a step up from the tubes the first univac and eniac were made out of.

Vacuum tubes are the step up from relays, I think you mean.

Probably true in Woz's time, but modern relays are probably more reliable overall than old school tubes.

But, yeah, tubes were the next step between relays and transistors.


What is the difference between Vista and OSX?
- Microsoft employees are excited about OSX.

Offline

 

#21 2008-04-01 4:37 am

Alien
Forum Czar
Administrator
From: Republic of Amsterdam
Registered: 1999-07-05
Posts: 16943
Website

Re: WOW.... guy builds computer out of relays

In my opinion, the tradeoffs put tubes about on par with relays.

Here's another relay computer, with lovely clickety-clackety geek pr0n movie goodness at the end.

A real step up from relay computing is building a computer out of discrete components.

I must admit I've been playing around with EagleCAD, designing both a relay and a discrete computer. Just doing the design proves to be tons of fun, in itself.

Seeing as you can buy bulk packages of relays and transistors at laughable prices on eBay, maybe when spacetime allows for it, I might even try to build one of those designs.

Funny thing is, these days, (hobby) computer design tends to travel backwards; you start by designing something like a single-board Z80 machine, then maybe a discrete TTL one, down to transistors, then down to relays. Each step down becomes more unwieldly to design, introduces more design problems, new and often complicated build problems, etc.

Building a tube computer isn't really a feasible project for most hobbyists (but there are, fo course, always exceptions).

With prices for relays as low as they are, it would even be quite possible (although expensive, bulky and energy-inefficient) to implement a workable sized storage entirely out of relays.

.tsooJ


http://macstack.net/forums/images/smilies/lol.gif

Offline

 

#22 2008-04-02 2:01 pm

user
Your plastic pal who's fun to be with
From: I'm not getting you down, am I
Registered: 2001-10-15
Posts: 16035

Re: WOW.... guy builds computer out of relays

I wonder if he had any bugs in his computer?


Aw, he's no fun, he fell right over.

Unless you become as little children, there's no way you will believe this crap.

Offline

 

#23 2008-04-02 2:10 pm

ukimalefu
4 8 15 16 23 42
Moderator
From: time loop
Registered: 2002-09-09
Posts: 9361
Website

Re: WOW.... guy builds computer out of relays

user wrote:

I wonder if he had any bugs in his computer?

I'm sure it doesn't run Windows, so no. wink tongue

Offline

 

#24 2008-04-02 2:37 pm

user
Your plastic pal who's fun to be with
From: I'm not getting you down, am I
Registered: 2001-10-15
Posts: 16035

Re: WOW.... guy builds computer out of relays

I mean, REAL bugs, the kind that get between the contacts of relays and that computer bugs are named after.


Aw, he's no fun, he fell right over.

Unless you become as little children, there's no way you will believe this crap.

Offline

 

#25 2008-04-05 6:01 pm

geekette28
Southpaw Extraordinare
Registered: 2006-12-26
Posts: 362

Re: WOW.... guy builds computer out of relays

Hee - I remember when they first told us that story in college. I think it was a fly. I dunno my iMac only has some stray cat hairs on the keyboard. I'd better go defuzz it.

And that was a nice summary of abstraction by the way. You could teach a college course perhaps. (It's kinda hard to find a comp sci teacher who can really articulate the theory without sending you to dreamland - especially in a night class)


Commit random acts of nerdiness and senseless acts of dorkdom

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson