[etoys-dev] Toy computers

David T. Lewis lewis at mail.msen.com
Sun Oct 2 23:01:43 EDT 2011


I am a lurker on this list, but a long time Squeak participant. When I
was a child, my parents gave me an interesting toy - a DigiComp I plastic
mechanical computer <http://en.wikipedia.org/wiki/Digi-Comp_I>. I always
remembered that toy, and it makes me wonder if computing machines could
be assembled by children using objects in Etoys.

If I wanted to assemble a simple computer, I would probably start by
connecting some registers and an accumulator, then figure out how to make
the bits move, like cycling the plastic clock lever on my DigiComp I.
So the first thing I might need would be a register object that does
arithmetic and logic operations when I push the lever.

I don't know much about writing morphs and making them work in the Etoys
environment, but I can write Smalltalk so I started by constructing some
basic register building blocks. First I made a BitRegister, which is a
simple one-bit computing element. Then I made a TwosComplementRegister,
which uses a collection of BitRegisters to make a more useful general
purpose register and accumulator of any size. I decided that using
numbers to implement arithmetic would be cheating, so it's all done
with booleans instead.

That's as far as I have gotten this weekend, but you get the idea. If I
could turn these register building blocks into graphical Etoys morphs,
then figure out how to assemble them into an arithmetic-logic unit, and
tie that together with an instruction interpreter, then pretty soon it
might turn into something interesting and fun for learning.

The register objects are on SqueakSource in project "Twos Complement"
at <http://www.squeaksource.com/TwosComplement>.

Collaborators welcome.


More information about the etoys-dev mailing list