
Build an 8-Bit Computer from Scratch - peter_d_sherman
https://eater.net/
======
jfktrey
Watching Ben's videos inspired me to finally assemble my Brainfuck-based CPU.
That is to say, its native instruction set is Brainfuck.

[https://hackaday.io/project/4237-mental-1-a-brainfuck-
cpu/lo...](https://hackaday.io/project/4237-mental-1-a-brainfuck-
cpu/log/59356-hello-world)

And a more recent video, showcasing PS/2 keyboard input:
[https://twitter.com/treykeown/status/867809790294097920](https://twitter.com/treykeown/status/867809790294097920)

~~~
yjftsjthsd-h
Sometimes I forget how crazy hackers are, and then someone goes and builds a
CPU... and uses BF as an instructions set. Thank you :)

~~~
dTal
It's impractical, but it's not theoretically out-there: Brainfuck is
essentially a minimal Turing-machine system. Someone attempting to build a
computer based soley on Turing's "On Computable Numbers" might very well wind
up with something like a Brainfuck-CPU.

------
bogomipz
This is really amazing. In addition to the interesting project this individual
has a great gift for articulating everything in a concise manner and with a
very pleasant cadence. What a great teacher. Thanks for sharing. I'm looking
forward to seeing the rest of this series.

If you only have a limited amount of time I would highly recommend the control
logic video:

[https://www.youtube.com/watch?v=dXdoim96v5A](https://www.youtube.com/watch?v=dXdoim96v5A)

~~~
beneater
Thanks for the kind words! And thanks to everyone for your interest.

~~~
_pergosausage
Hi ben, how do you feel about minecraft as a tool to learn about and practice
computer design? Most of my comp-eng work has been in minecraft, but i
constantly feel as if it isnt quite 'legit'. The main reason i used it is
because it has no cost for components.

~~~
xenophonf
I'm not OP but speaking solely for myself, Minecraft has really turned me back
on to all the logic design stuff. For example, see my single-push-button
castle gate control, [http://imgur.com/a/tBzJh](http://imgur.com/a/tBzJh). Of
course, Minecraft physics aren't the same as real physics, but I think this is
a great way to introduce anyone to circuits. It's certainly a lot more fun
than the various exercises I had to do in my college EE classes.

------
lelandbatey
I've been building PCBs for this series in my spare time for the past couple
months, this last weekend I finished the design for the ALU:
[https://github.com/lelandbatey/custom_cpu--
ALU](https://github.com/lelandbatey/custom_cpu--ALU)

I've then been having them manufactured in China for, which you can have done
for ~$15 for 5, shipped. It's very satisfying to have finished fancy PCBs to
solder together, and I've learned so much about electronics, PCB design, and
small scale board manufacturing since starting this project!

~~~
justifier
do you have a link to the manufacturer you are using?

also, do you have images of the empty pcb and finished product after soldering
the components that could be added to the git repo?

edit.. just saw some pics from your other comment:
[https://news.ycombinator.com/item?id=14457760](https://news.ycombinator.com/item?id=14457760)

~~~
lelandbatey
Here's who I've been having the boards manufactured by:
[https://www.elecrow.com/5pcs-2-layer-
pcb.html](https://www.elecrow.com/5pcs-2-layer-pcb.html)

They're by far the cheapest I've found. They charge $5 for 5 PCBs, with a
10cmx10cm area each. The cheapest shipping at $6 will get them to you in about
20 days from order date, while the Shenzhen DHL shipping option will get them
to you in about 7 days from order date. At least, that's been my experience
ordering from them.

------
gravypod
I'd love it if Ben sold a single package kit that had everything and printed
instructions inside of it. It would be a fun thing for bored highschool
students or university students.

Maybe it could even have a PCB that has everything socketed like a breadboard
except closer together.

~~~
lelandbatey
I've actually been designing PCB versions of the modules for Ben Eaters tiny
CPU, you can see them on my GitHub. Here's the latest one I've done, the ALU:
[https://github.com/lelandbatey/custom_cpu--
ALU](https://github.com/lelandbatey/custom_cpu--ALU)

Here's what the physical versions of the clock and the register look like
during testing (red is clock, blue is register):
[https://goo.gl/photos/NSAEYVu7AbXVjcBK6](https://goo.gl/photos/NSAEYVu7AbXVjcBK6)

~~~
bogomipz
Wow these are great. Is your background in EE then?

~~~
lelandbatey
No, my background is entirely in CS. This is the first circuit and electronics
work I've done, though I have two friends much more acquainted with
electronics than I who have been giving advice.

------
TomNomNom
I've been following this series for a while now and it's been fantastic. In
particular I recommend the videos on making an EEPROM programmer with an
Arduino.

To help me understand everything better I've been writing a kind of
emulator/simulator[0] (I'm never quite sure of the difference). It still needs
work and some terminology changing to match Ben's, but it's got basically the
same functionality as the real one.

It's actually a really nice way to be able to rapidly prototype new microcode
because the instructions are defined as a slice of bit-fields representing
which control lines are set for each cycle[1].

[0]: [https://github.com/tomnomnom/eater-
cpu](https://github.com/tomnomnom/eater-cpu)

[1]: [https://github.com/tomnomnom/eater-
cpu/blob/master/instructi...](https://github.com/tomnomnom/eater-
cpu/blob/master/instructions.go#L35-L41)

~~~
iKlsR
Emulators can be used in place of the system they are crafted after for real
world use. Simulators on the other hand are more meant for analysis as they
offer more variable control.

------
_pergosausage
This remimds me so much of the computer i made in minecraft.

[http://m.imgur.com/a/lPZbk](http://m.imgur.com/a/lPZbk)

~~~
jacquesm
That, for want of better words, is absolutely amazing.

------
CogitoCogito
He's on patreon:
[https://www.patreon.com/beneater](https://www.patreon.com/beneater)

His videos are so great, I'm happy when I get my monthly emails that he's
receiving money. It's a good reminder that I need to hop back on them!

------
throwaway2016a
This is awesome!

I had to build a 4 bit computer in college and it looked almost exactly like
this (less breadboards and components though). The professor wrote the
textbook herself. If she made it into a webpage I imagine it would be a longer
version of this.

To date is one of my favorite classes I took.

------
Retric
Still waiting for the Primitive Technology guy to do the same thing, with the
camera opening on a pile of sand.

Sure, it's still cool to see someone use 4-bit binary full adder etc and build
a computer, but the from Scratch always feels disingenuous.

~~~
jfoutz
To make an apple pie from scratch, you must first invent the universe.

~~~
Retric
To make an apple pie from scratch, you must first invent the universe _from
scratch._

------
throwaway7645
I've been waiting for something like this for awhile and am super excited. I'd
be even more stoked if the next project was building a small Forth from
scratch and flashing that on the board.

You could show how you could interactively test and control the board that
way.

------
deelowe
Been following his YouTube channel for quite a while now. Very fascinating

------
fberg
For some definition of "scratch".

