Live data from Hacker News

Building a Modern Computer from First Principles

nand2tetris.org

51–60 of 84 posts

Re: Building a Modern Computer from First Principles

#51

I going to come across as defensive here, but I'm actually in a Computer Engineering program (not Computer Science). This book purports to cover as much material as 8 undergrad courses, I feel like it must skimp on depth to (for example) condense all of 'compilers' into two weeks. Compilers are a very large topic, a single undergrad course isn't even sufficient to really understand a real world project like GCC. Like…

You sound a bit defensive. The title of the post is "Building a Modern Computer from First Principles". It's a book; the author doesn't claim equivalence to a computer engineering degree. The areas of study you've listed are gaps a motivated student with appropriate background can fill through self-study or other means. Depending on your chosen career after graduation, you're likely to have some gaps of your own. I don't mean to compare your curriculum to the book, but to make the point that there is always more to learn.

As some of the responses have stated the book appears to (because I haven't read it, yet) motivate (i.e. motivate as professors do as part of the introduction to a course: why are we learning this? how may we apply this? what should we learn next?) topics the reader may want to study deeper.

Re: Building a Modern Computer from First Principles

#52

I going to come across as defensive here, but I'm actually in a Computer Engineering program (not Computer Science). This book purports to cover as much material as 8 undergrad courses, I feel like it must skimp on depth to (for example) condense all of 'compilers' into two weeks. Compilers are a very large topic, a single undergrad course isn't even sufficient to really understand a real world project like GCC. Like…

As he mentioned, at least one school calls it computer science 101. It's not a replacement for an entire computer engineering degree.

I also studied computer engineering (and computer science), so I got all of this information over the course of 4 years, but I think it would have been valuable to take this course up front in order to immediately understand how all the pieces fit together.

It would also be valuable for computer science students who don't get most of the computer engineering material.

Re: Building a Modern Computer from First Principles

#53
post #32

Earlier quoted context omitted.

Historically, writing to the screen was done by writing either ASCII or pixel values to a special region in memory (e.g. Apple II, IBM PC). I'm not sure what you're suggesting the book should do instead? Use a serial port and terminal? Implement a GPU? (I'm not being sarcastic, just looking for clarification.)

My point is that after reading the book I kind of knew how I could implement a simple CPU in real HW (with ALU, memory, etc.) but it was not clear to me how the IO part (kbd, screen) would work. Is the kbd connected directly to a certain place of memory? How is this implemented? Would there be some screen/gpu HW that is directly connected to the memory region? How is the CPU clock involved? E.g. if you press a key, h…

If I'm not mistaken, the keyboard should raise high an interrupt pin on the CPU, which should cause an interrupt service routine to be called.

That routine should then mask lower-priority interrupts, poll the appropriate region of memory (assuming memory-mapped IO) for the byte or bytes held down, push those onto the buffer for key inputs or into the STDIN equivalent, unmask lower-priorty interrupts, and return.

It is then up to the user program to read in from the buffer and do the needful.

Re: Building a Modern Computer from First Principles

#54
post #34

If you don't need to go as deep or as far, you might want to consider 'Code' by Charles Petzold: http://www.charlespetzold.com/code/ I found it great read and it covers some of the ground of this course.

I second this recommendation. Code is a really great tour through the creation of a digital computer, and helps build a fertile ground for later questioning and research into the field.

Re: Building a Modern Computer from First Principles

#55

Earlier quoted context omitted.

I don't understand your critique. A book manages to condense the design of a computer -- from gate-level to operating system -- in a 300 page tutorial and you do not like the fact that it glosses over some details? I doubt any single person has the knowledge to build a modern computer from scratch, and few people have/need the knowledge to go from gate level to OS-level in the real world. This book aims to change tha…

My biggest problem with the book is that it gives you an adequate, hand-wavey idea of how a computer works, but it doesn't impart any hard skills. Karnaugh maps are a reusable skill in digital design. I've done hundreds of them for simple problems, it's like breathing now. I suspect using multiplexers to simplify a design is also left out. VHDL is a real language people actually use, and you can put it on your CV or…

This is like complaining learning algebra doesn't equip you to be a mathematician. That's not the purpose.

I studied computer engineering and computer science, and I haven't used Karnaugh maps or VHDL since college because I write software now. I'm still glad I studied computer engineering though, because it gave me a deep understanding of how computers work.

Re: Building a Modern Computer from First Principles

#57

I going to come across as defensive here, but I'm actually in a Computer Engineering program (not Computer Science). This book purports to cover as much material as 8 undergrad courses, I feel like it must skimp on depth to (for example) condense all of 'compilers' into two weeks. Compilers are a very large topic, a single undergrad course isn't even sufficient to really understand a real world project like GCC. Like…

I think you are significantly overestimating how much knowledge is necessary to do these things. This course does not claim to prepare you to be able to work anywhere near the current level of technology, it claims to teach you enough to construct a Tetris game starting from NAND gates. I can assure you, that Attanasof (inventor of the electronic digital computer) would have killed to have a resource like this.

To go with your specific example of compilers. Why would people need to learn enough to be able to conrtibute to GCC to get anything out of this course. GCC is the leading open-source compiler; knowing enough to contribute is overkill.

To give an example from personal experience, I, over the course of a weakened, wrote my own operating system from scratch, without having had any formal training in Systems design. I have no doubt that my system would collapse under the weight of doing anything remotely close to what we would expect a modern system to be able to do. The only reason I was willing to risk running it on bare metal was that I had an old, semi-broken, laptop that I didn't care about. But I still learned a lot from the process.

In terms of including it in an comp. eng. program, it seems like it would fit in well as a 101 course. It provides a big picture of how everything fits together, and a first look at all of the topics will help enough when you go to learn them in depth that it seems like it could be worth the time investment.

Re: Building a Modern Computer from First Principles

#58

I pointed this out above, but this is really a course for CS people that glosses over a lot of computer engineering topics that you need to, say, design your own processor. It's definitely a tremendous accomplishment, but let's keep our pants on here.

Such as? Does it skip over K-maps or something?

If you control-f, there's squabbling at length below about the fact that they don't cover k-maps, k-maps aren't important, etc.

Or you're being sarcastic. I'd hate to assume that, but someone did go through and downvote all of my posts.

Re: Building a Modern Computer from First Principles

#59
post #33

Earlier quoted context omitted.

There's nothing wrong with taking a course that covers a very wide area, even if you're intending to specialize more deeply in all the topics later. It's actually a very effective learning strategy, because it motivates all the subsequent deeper dives.

I guess personally I would feel like I wasted a semester when I had no problem being motivated to deep dive into the other topics already. I suppose if someone was undirected and needed to pick a specialization this might help.

Ah, but if you're actually motivated there's nothing stopping you from going as deep as you want into any of the topics. There's never an excuse for "wasting" a semester.

Coursework is the minimum, not the maximum.

Re: Building a Modern Computer from First Principles

#60
post #59

Earlier quoted context omitted.

I guess personally I would feel like I wasted a semester when I had no problem being motivated to deep dive into the other topics already. I suppose if someone was undirected and needed to pick a specialization this might help.

Ah, but if you're actually motivated there's nothing stopping you from going as deep as you want into any of the topics. There's never an excuse for "wasting" a semester. Coursework is the minimum, not the maximum.

What I meant was that I would want to deep-dive into each topic, but we'd be busy moving on, and I'd cover all that material again next year anyways. I don't think survey courses fit my way of looking at topics, I'm very single-minded. That doesn't mean they aren't valuable or they can't work for other people. Just that I wouldn't want them to be mandatory.
Post reply on HN