Live data from Hacker News

Simple CPU

simplecpu.com

31–40 of 65 posts

Re: Simple CPU

#32

Anyone who cares about this topic is welcome to contribute to https://en.wikibooks.org/wiki/Programmable_Logic/Verilog_for... I started it at the request of some HN users, and I hope it continues to hopefully enlighten some software folks who wonder how the CPU they rely on actually works.

I'm not sure how and where or indeed if to contribute, but as a programmer who learned digital electronics (stack of free 74xx chips) before diving into programmable logic, one thing that really helped make these things click for me was thinking about hardware as transistors and learning the very basics of electricity and related physics. This helped me see digital electronics not as a sequential process but as a con…

I had a similar experience. Digital logic is very clean and neat, but the part where things broke down for me are things with feedback loops like latches. It's a bit tricky to tell what's going to happen in such devices without some analog background.

Re: Simple CPU

#33
post #24

This is my first real introduction to uber-low level computer science. I managed the following super simple program: 1. 00000000 2. 00000001 3. 00000000 4. 00000001 5. 00000010 6. 00000011 7. 00000011 8. 00001010 9. 00000000 10. 00000001 The CPU jumps to the instruction at #4, which tells it to add the value of #2 to #3. The instructions at #7-#10 reset the instruction pointer to 00000001, so that it'll increment to…

This makes it into a bit of a game: https://microcorruption.com/

I tried to sign up, but I got a "Sorry, but this form is no longer accepting submissions." :(

Re: Simple CPU

#34

I thought this was pretty clever: 00000001 A program that doesn't work if you move its location in memory is pretty hilarious.

Overlapping code/data is a trick used in practice in highly size-constrained systems, like older game consoles (e.g. http://andrewkelley.me/post/jamulator.html#dirty-assembly-tr... , discussed here at https://news.ycombinator.com/item?id=8405214 ) and in the tiniest categories of the demoscene.

Re: Simple CPU

#35
post #18
post #5

Here Feynman explains the basic logic behind building of all of the computers. He is inspiring even if you know more details about the topics he talks about, because he stimulates you to a fresh view. The youtube title is, IMHO, misleading. The lecture is about the basic hardware concepts and not about heuristics, so I think it fits perfectly with the OP. http://www.youtube.com/watch?v=EKWGGDXe5MA Edit: At the start…

Thanks for that. Man, Robin Williams would've played the heck out of a Feynman movie..

Saying that is torturous

Re: Simple CPU

#36
post #12

Very nice. One request: don't introduce the concept of 'nibble' on the first page. It's jargon that no one needs in this general introduction. And it just sounds silly.

I don't know. I heard about nibbles right at the beginning and then promptly forgot them. I even remember thinking that the word was silly. But it set me up for a very nice epiphany the first time I saw bytes written as hex and played a part in my instantly grasping that.

I'd be curious to poll people's experiences, but, I can say that I had never heard the term until today and I've known this stuff for a number of years.

And it sounds silly and adds nothing. That too.

(edit: my education on this stuff was in the 00's. Sounds like it was more common in the 80s. I'd definitely support obsoleting the term entirely now, though! It adds unnecessary complexity.)

Re: Simple CPU

#37
post #13

I wish they would give us such a summary at the college before talking about all those confusing stuff. Excellent work!

They did for us; right in the first two semesters we had 4–6 hours a week just low-level stuff. They also introduced us to algorithms and data structures with Pascal, not Java (which I'm very thankful for).

It was quite enlightening to see over the course of three weeks or so how a (simple) CPU could be built from ever-larger building blocks, but starting at the very beginning with transistors.

Re: Simple CPU

#38
post #36

Earlier quoted context omitted.

I don't know. I heard about nibbles right at the beginning and then promptly forgot them. I even remember thinking that the word was silly. But it set me up for a very nice epiphany the first time I saw bytes written as hex and played a part in my instantly grasping that.

I'd be curious to poll people's experiences, but, I can say that I had never heard the term until today and I've known this stuff for a number of years. And it sounds silly and adds nothing. That too. (edit: my education on this stuff was in the 00's. Sounds like it was more common in the 80s. I'd definitely support obsoleting the term entirely now, though! It adds unnecessary complexity.)

I first read nybble/nibble in a book in the late 80s when I was a kid.

I don't think I read or heard about it again for over a decade. It's never sounded silly to me, or at least no more silly than "byte", and it's at least slightly useful to explain converting hex.

Re: Simple CPU

#39
post #36

Earlier quoted context omitted.

I don't know. I heard about nibbles right at the beginning and then promptly forgot them. I even remember thinking that the word was silly. But it set me up for a very nice epiphany the first time I saw bytes written as hex and played a part in my instantly grasping that.

I'd be curious to poll people's experiences, but, I can say that I had never heard the term until today and I've known this stuff for a number of years. And it sounds silly and adds nothing. That too. (edit: my education on this stuff was in the 00's. Sounds like it was more common in the 80s. I'd definitely support obsoleting the term entirely now, though! It adds unnecessary complexity.)

I suppose that nybbles are not encountered much now due to the fact that most systems are byte-oriented, but back when 4 and 8-bit CPUs were far more common relative to bigger systems, the term appeared quite often in documentation - especially when talking about BCD formats.

Re: Simple CPU

#40

Earlier quoted context omitted.

I'm not sure how and where or indeed if to contribute, but as a programmer who learned digital electronics (stack of free 74xx chips) before diving into programmable logic, one thing that really helped make these things click for me was thinking about hardware as transistors and learning the very basics of electricity and related physics. This helped me see digital electronics not as a sequential process but as a con…

I had a similar experience. Digital logic is very clean and neat, but the part where things broke down for me are things with feedback loops like latches. It's a bit tricky to tell what's going to happen in such devices without some analog background.

For me, I think visualising the timing really helps - and remembering that signals and gates do not act "instantaneously"; there is always a propagation delay. This is also why shift registers work. Things like edge-triggered flip-flops would be impossible if gates and signals were infinitely fast.
Post reply on HN