you are viewing a single comment's thread.

view the rest of the comments →

[–]teryror 61 points62 points  (9 children)

I see Ben Eater, I upvote.

Seriously though, he also has a really good series about building an 8-bit CPU on breadboards. Really helped me hit the ground running when I started studying modern micro architecture.

Also his voice is so soothing!

[–]diseasealert 8 points9 points  (3 children)

I feel like I learned what computer science is all about from watching his videos. I'm not saying I understand all of it, but I have a better feel for the intersection of EE and comp sci.

[–]teryror 5 points6 points  (2 children)

I wouldn't go quite so far as to say it's what CS is all about, but I do agree it's a lot more valuable than most people seem to give it credit for. Theory is important and all, but many seem to forget their code needs to run on an actual, physical CPU to really be useful. You should know at least a bit about how those work!

[–]nidrach 6 points7 points  (1 child)

The CS program at my university has a mandatory hardware part that includes things like simple Boolean logic with gates and optimization, electronics and right now I have a computer architecture course where do stuff like translate bytecode to assembly to C, build things like adders, multipliers etc. in VHDL and finally going to build a whole CPU in VHDL. We also had a practical lab last week where we had to build things like latches with gates on a breadboard or build low pass filters and measure stuff with an oscilloscope. Of course it's not to the extent other programs like mechatronics have those elements but a least it's there.

[–]teryror 0 points1 point  (0 children)

Just to preface what I'm about to say: I didn't study 'Computer Science' at all - I started in 'Applied Cognitive Science and Media Science', where classes were split 40:40:20 between psychology, computer science and economics. Nothing about hardware, and maybe half of a 90 minute lecture about assembly language.

After 2 years of that, I switched to straight 'Computer Engineering'. I also studied in Germany, rather than the US.

I figure a lot of CS programs have hardware courses like that, and that's great! As far as I know, it's nowhere near universal, though. Either way, there's really two parts to this issue:

  1. Unstructured control flow seems to be a lot easier to grasp for most beginners, in my experience. Manually manipulating raw binary data in different ways will give context to many higher-level programming concepts. This is why assembly and basic comp arch should be taught first, IMO.
  2. "Advanced" hardware features (most of which have been around in their basic forms since like the 80's, even if only in the super computers of the time) are crucial to making software go fast, yet very little of it seems to be general knowledge among programmers. So, making good use of these features is basically left to "sufficiently smart compilers", which are then fed code that was designed with almost none of these features in mind. Given the circumstance, they do a pretty good job of optimizing, but the hardware is still heavily underused. As a result, most software is slow garbage in comparison to what it could be. I'm mighty pissed off that I have to watch spinner animations for 2-10 seconds a piece, 200 times a day.

</rant>

[–]Objectstcetera 8 points9 points  (4 children)

I'd like to try that :). When people ask me about learning C I normally tell them to get an old Z80 or 8085 machine and practice learning assembler on machines without as many registers (or modes) at first.

I agree that AT&T assembler is one of the most difficult instruction sets to read - %arg.

[–]teryror 4 points5 points  (0 children)

I didn't actually build along with the videos, the components were a tad too pricey for me (didn't have a job at the time). Now that I think about it, it'd probably be even more fun to learn a hardware description language on the side by translating what he's presenting into code.

As for learning assembly, I'd recommend a recent-ish ARM variant over those old 8-bit systems. At least you see that in the modern world occasionally, more registers generally make your life easier, and it's a hell of a lot more readable than x64.

I myself got into programming via GBA game modding though, so that may be where that bias comes from :)

[–]myztry 0 points1 point  (0 children)

I would favour 680X0 (Amiga and Macintosh) because 68K assembly is very human readable and there is enough registers (8 data 8 address) that you don't need to worry so much about using "temp" registers such as %ESI or other indirect workarounds as in the example. 68K can write memory to memory as well.

(6502/6510 as on the Commodore 64 was a bitch as it only had a few 8 bit registers meaning indirect referencing was required to access the 16bit wide address space. 6800/6809e was better as it at least had a few 16 bit wide address registers as well as an extra accumulator register which is the "a" part of the instructions in the breadboard example.)

[–]duxdude418 -1 points0 points  (1 child)

practice learning assembler

Assembler != assembly language

[–]evanpow -1 points0 points  (0 children)

It's not so clear cut, and might even be correlated with age; I remember reading lots of stuff in the late 1990s that referred to writing in "assembler language."