Hacker News new | past | comments | ask | show | jobs | submit login
Written by a 16 year old, a book on how computers work (github.com/hackclub)
215 points by ILyesMk2 4 months ago | hide | past | favorite | 79 comments



What a commendable effort! I come from the days of KIM-1 and cpu and memory boards where the function of every chip was discernable.

At the time, I told my boss to learn these things while they were still comprehensible.

Knowing "what goes on inside" is fun.


ty! Those days and people like you are what made these things last long.

> while they were still comprehensible

They, in fact still are. Only if you put the time and effort to know what goes inside, It's not fun in terms of learning, but interesting. Then it becomes fun after you really know what goes on.


They are, in fact, not still comprehensible. Don't get me wrong, you can learn a lot, but it's no longer possible to have an in depth understanding of everything going on in a modern PC. At a certain abstraction level, sure, but the subsystems are now too complicated for one person to have detailed knowledge of it all.

Okay, I used the word "possible", but perhaps I should have used the word feasible. If the information exists then it's "possible" to learn it. Although given that the hardware companies no longer actually tell us everything that's going on in their hardware, you could make an argument for it not being possible.


Well, i didn't claim i know it all. But i gave it my best because it's true that one person can't have the detailed knowledge of all the now-existing complicated subsystems.

> If the information exists then it's "possible" to learn it.

Not with most of the terrible (i.e Lenovo, Wikipedia) information found online, It's never impossible but very unlikely.

> hardware companies no longer actually tell us everything.

Rambus :P


Hats off! Wish I had the the grit and determination at 16 to write something like this

> A 'special' CPU register that holds the memory address of the next instruction

Though it's been years since (grad school) I dealt with any assembly, for some reason I recall this being the EIP register? These days, I rarely touch low level language and yet, I have such a deep and profound love for them.


You're welcome. It wasn't as easy as it looks now, but i managed to pull it off at this age.

> I have such a deep and profound love for them.

Oh god, i wish i included more about registers but it isn't the main focus- And thank you for clarifying which REG it is, It's added to the book!


It depends upon the manufacturer. Motorola used PC (program counter), Intel used IP (instruction pointer). I think it's only the x86 that has multiple names, depending upon the size: IP for 16 bits, EIP for 32 bits, RIP for 64 bits.


RIP with 64-bit x86


Better to start with 64bit registers these days, it's rare to find a 32 bit system when you are just starting out learning assembly.

The "Write great code" series of books is a must read for those interested in low and "high" level concepts.


> Better to start with 64bit registers these days, it's rare to find a 32 bit system when you are just starting out learning assembly.

x86-64 ("x64") versions of Windows can run x86-32 binaries.


Of course, but most if not all of the binaries on the system will be 64bit. Someone just starting out may struggle to find a 32 bit binary.


Your comment suggests that you don't work on a Windows PC very often: it is the common situation to find quite many older applications on the PC that are 32 bit. Just to give one example: until Visual Studio 2019, Visual Studio was still a 32 bit application.

Actually, there even today exist quite some vocal Windows users who would love to run some really old 16 bit applications on their 64 bit Windows PC (but Microsoft stopped supporting running 16 bit binaries on 64 bit Windows versions).


These are not mutually exclusive positions, but afaik visual studio isn't part of the os. As another commenter mentioned, the builds are all 64bit as well. Sure you can always find a 32bit app to install, but the point is a beginner may not do that and be disappointed when the registers they see on their machine don't match what they read about.


Especially in today's hardware (/software?), all the bins on the system are 64bit even if it's a 32bit binary, the remaining bits get filled by 0s so that the system treats it as a 64bit bin.


Awesome work! As always, there is an opportunity to “extend” this down/up a few layers :)

Also, are you Algerian by any chance? I am Tunisian - it’s always nice to see North Africans (and Africans in general) on HN!


Appreciate it!

> there is an opportunity to “extend” this.

Ofc there is, and im already up to it. So apparently my username is screaming 'Algerian' lol, It's so good to see a Tunisian here (or HN).


It wasn’t obvious, but a North African would figure out the combination of name + dz on your GH profile :P


That was spot on Middle Eastern powers you got right here!

I bet it's not as easy to figure it out now.


I keep thinking someday I’ll write something but my life has been such a mess lately and my inspiration is about as low as it’s ever been.


Congratulations on writing these twenty seven words, great start, keep it flowing.


I have so many things in my backlog, from launching a startup, writing some app, blogging, producing some music, getting into amateur filmmaking, picking on padel, learning many new things in programming, contributing to OSS more, learning more vegetarian dishes, making more time for friends and family, I could go with this list for on and on.

Till my early 30s this had given me anxiety and sadness.

After 35 I accepted that I have more ambitions and interests than time and energy, and shifted instead of living more day by day and doing things at my pace and according to my mood.

Slowly I sometimes do some of the things I wanted to, I feel fulfilled and definitely less stressed.

The feeling of not doing enough was sometimes itself paralyzing, now I just don't care and enjoy and end up doing more.


I also have a similar struggle right now with similar ambitions. I’ve been finding that while I want to do many of these things idealistically, in reality I didn’t end up actually doing them and just idealizing in a sort of paralysis of getting to my end goal. I’ve been learning the balance of pursuing these things when I’m interested and to not stress about simply watching television. I’m not probably going to be the next hot shot OSS contributor or project creator, but a few patches and features here and there is actually more than enough. Day by day is great advice for long term happiness (and productivity), and as Bruce Lee says: “I fear not the man who has practiced 10,000 kicks once, but I fear the man who had practiced one kick 10,000 times”


This is beyond brilliant! So well written. Love the gen Z tone. I’m bookmarking it for my kids.


Haha, that was the #1 priority while writing!

Let them kids know what happens under the hood of their systems.


Have you tried explaining it to someone? They will provide you feedback whether they understand, which will help you improve your material and explanations.


Yes, a handful of times. Everything seemed positive to me so i knew it was ready


They have an equally impressive post [1] about CPUs!

[1] https://cpu.land


This gives me very old-internet vibes. Like somebody mashed together an introductory guide to how computers work with Real Ultimate Power: https://www.realultimatepower.net/ninja/ninja2.htm

I don't know how to feel about it as an effective instructional guide, but it sure is creative. If it helped its author understand computers through the act of collecting, organizing, and presenting the information, I suppose it was worth it in the end.


It's nothing but WORTH the effort-

> If it helped its author understand computers..

Probably the main reason this book even existed in first place and the perfect example of "The best way to understand something is to explain it to someone else."


I'm curious whether this helps anyone - why and how.

I suppose there's some value in minimizing the "cultural impedence mismatch" - using genz terms/style/jokes.

But the quality is not as good as "normal/longform" (let me coin "oldsplaining") coverage on the subject. And really, shouldn't we all aspire to do a good job, rather than just a meh job that's comfortable?

This is the TT of explanations: not entirely accurate, relatively shallow, aimed at being quickly scroll-through-able to obtain a facile sense of knowing. For people who find Blinkist too slow-old-fashioned. You can survive on Pizza Pops, but you really shouldn't.


A byte is the smallest addressable unit, not a bit.


Oopsie, good catch! I intended it as 'the smallest space X can take'

i corrected it.


It's a pretty impressive write up.


Nearly all current computers address bytes, but in the past we had many computers that addressed words instead as well as processors like the Texas Instruments 34010 that did address bits.


This article could maybe use something about Dell having a partnership with Rambus proliferating the world with those modules RD-RAM for a year or two. It was more than just a concept which never saw light. It was a spectacular failure.


It’s a cool project. You’ll have fun writing a compiler


I can say the same! I considered doing so at some point during my research, might actually give it a go.


I did a JIT one for Brainfuck. Pretty easy thanks to the language’s simplicity.


I see, I see... I wonder why we (as in me) don't hear anything about Brainfuck anymore. I kind of see it as a 20th century meme language that proves boomers were trying as hard as they could to make it work, basically what I call a living example. I (100%) believe your JIT story.



Love the cute writing style it's actually more fun to read compare to boring textbooks


It’s inspiring. Just wanted to write it.


Greetings! This is coming from a.. as the title says, a 16 year old who wrote a mini-book on how computers operate internally focusing on RAM and CPU aspects, respectively. Because almost all of us (if not all) use computers and similar devices on a daily basis without an ACTUAL idea on how they work, even though you might have a brief view of your system. You get my point.

Just the fact that I've been using something and not knowing the way it really works, made me go insane. And that's exactly why i stepped up and taught myself all of it, from start to finish, While Apparently my coding knowledge didn't undermine me from writing this in a way of "Im teaching you what i learned" rather than "learning and writing" that took nearly 6 months to finish completely!

If you're the background person.. fine, some acknowledgments you might want: Something that made me crazier? web-dev, no disrespect to you folks out there but i had to add some extra time to the writing (which is exhausting in itself) just to code a (yet) simple HTML/CSS/JS website for the book. But since then, i fell in love with web-design and styling after using Figma to draw all the illustrations seen throughout the segments. Also I had the idea to initiate this project when i was 15! So i think it's pretty safe to say that this article went through a draft-phase of randomly collecting technical information.

And i'm finally happy to share it with the globe! to put it in simple Hacker News fashion, any feedback and/or suggestion(s) is greatly appreciated hoping this becomes a learning material. Check it out and i guarantee you will learn a thing or two: https://github.com/hackclub/RAM-a-thon


You’ve been bitten by a bug thats prevalent across space and time. The poor souls who carry this awful affliction have segregated themselves from the polite society to avoid a catastrophic societal collapse. They don’t know what they are anymore. We call them embedded systems engineers. We don’t know how deep this rabbit hole goes. I wish you a safe journey.


>...when I was 15!

Eh, ideas like this should be pretty simple when you're 1,307,674,368,000 years old ;-)

As others have said, very cool book. Thank you for sharing!


I like how you highlight key terms. I think that helps a lot with readability.

I also like the irreverent tone.


> 1

The key-terms highlight was a very late addition, the text without it was a bit uncomfortable to read.

>2

I hope this catches the eyes of Gen Z/Alpha so they can understand how the tablet they're using to watch skibidi videos with works.


> Unexpected tidbit: If you abbreviate the term 'interrupt descriptor table'. Then reverse it - You get 'TDI', which stands for Turbo Charged Diesel Injection, an engine developed by Volkswagen fo- Okay. Ethically, believe it or not but computers emit more CO2 than cars.

Does this really help people learn the material? I am doing a presentation on networking in a week or two for a high school group. Certainly I could include stuff like this, but to me it seems more like a distraction. If I was writing this I would rather include something like a sample table of how IDT's were used by old DOS video games. (Disclaimer: I'm 30)


There's a huge difference between an adult talking to a bunch of teens and a teen addressing a bunch of teens. I'm not saying this would be the case with this particular thing but it's not hard to imagine something delivered by a peer which could at worst come across as dorky vs outright cringe when adopted by someone else.


If I were to include such a digression, I'd probably keep it as a footnote.

But all in all, great work, OP!


My pleasure, happy that you liked it


I think it's audience-dependent. For readers with less background and less pre-existing motivation to learn the material, I think it helps to cut down on the density a little. It's kind of a cruddy experience to have to pause and digest every sentence as you go and it makes it physically hard to read a book that way since you have to constantly track where you were.

If the audience has more background in the material and a stronger pre-existing motivation to read it, then it is probably a distraction, and they need a higher density of information to keep flow.


So true.

Especially with term highlighting, makes it 2x easier to read and keep the information flow to process (and funnier?).


My 2 cts: in Germany yes, in the rest of the world, absolutely leave it out.


> Disclaimer: I'm 30

This says it all- jokes aside, i couldn't resist writing a book without including combustion engines.


> I couldn't resist

The common refrain of a teenager... https://www.npr.org/2016/04/15/474348291/why-teens-are-impul... honestly at that age I never went out of my room, and I still got in trouble. If you do develop some self-control, you could look at https://blog.benjojo.co.uk/post/dive-into-the-world-of-dos-v... or https://www.sciencedirect.com/science/article/abs/pii/B97801... (c.f. also https://hackmd.io/@_01X9rimQmWH33Djf8QhoA/SkygF9WdP which is based on that book)


These are some of the useful link that i wish came up when googling, and DOS is fairly interesting in itself knowing it's behind everything from medical equipment to today's common refrain of teenagers.


I’m going to disagree with that other guy.

It’s your book. If you want to have a lighthearted fun digression about combustion engines then I think that’s fine.

When I read textbooks a fun little digression now and then doesn’t bother me at all. Usually it puts a smile on my face.

I am also in my 30’s like that guy and that’s my 2 cents.


[flagged]


It's frustrating to come back here and see a commenter getting into internet hostilities with a kid. It makes me want to say "pick on someone your own size".

If you want to understand why I feel that way, I posted a long explanation in a different part of this thread: https://news.ycombinator.com/item?id=41167981.

I'm pretty sure you didn't intend to come across that way at all, but you unfortunately did so whether you intended to or not, and you weren't the only one.


We already have that, instead you should write a book on how to not be rude


I'm learning... I worked in a political survey call center and I actually got fired for being too rude but it's hard to unlearn bad habits. I try to be honest but then people take it as an insult...


Well guess what? I wasn't rude either. Honestly i only addressed a bad habit you seem to have.

In all of it's glory, insults are criticism.


Well, I've enjoyed our conversation, I didn't feel it was particularly hostile. Certainly compared to Linus's old flames it was very civil. It's a pity dang is frustrated.


Relatively speaking, it wasn't (still) not hostile. I've seen worse.

This was more of a fact vs fact indirect disagreement rather than being completely foolish


[flagged]


Please don't be an internet jerk on this site. We're trying for something different here.

https://news.ycombinator.com/newsguidelines.html


Perhaps, my comment is seen in detachment from the article in question. The "blah blah" is actually part of the article, and serves to dismiss the verbosity of a formal description of RAM.

I do question the need for the verbosity of their own.

As a constructive advice, I do believe that a visual representation of the subject serves better not only to this context but also to the target audience.

As a side-note, I have a member of such audience still enjoying the summer break ... the wall of the OP text proved impenetrable, despite the initial interest.


You're right, I missed that context, but your comment still came across as dismissive and critical, and for a post like this one it's especially important not to do that.


[flagged]


> garbage-tier

Please don't be an internet jerk on this site. We're trying for something different here.

https://news.ycombinator.com/newsguidelines.html


I said this is common in bad textbooks, not necessarily that this is one of these.


That's the sort of thing a comment needs to disambiguate, or by default it will be taken the wrong way. See https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... for past explanations about this. In a context like this thread, this is particularly important. I tried to explain why here: https://news.ycombinator.com/item?id=41167981.

(Those links are just in case you're interested—I'm not suggesting that you or anyone else needs to read them.)


It's written by a 16 year old. We know it isn't going to get added to college curriculi anytime soon.

Just appreciate the effort and stop being an ass.


Isn't this a violation of Hacker News posting guidelines? The title has been excessively edited to attract attention. According to the HN guidelines:

"Otherwise please use the original title, unless it is misleading or linkbait; don't editorialize."


I don't think we need to bring hammers down on 16-year-olds.


I am surprised to hear you describe “applying the rules even-handedly” as “bringing the hammer down on a 16-year-old.”

IMO, we should all be held to the same standard.


(FWIW I wasn't referring only to the GP comment but also to the follow-up at https://news.ycombinator.com/item?id=41154764.)

The rules aren't that rigid to begin with - for example there's always been a bit more leeway for authors to use different wording in the HN submission title (note that I said "a bit more" - it's not a free-for-all). That's one reason we tend to use the word 'guidelines' rather than 'rules', though I do switch between the two.

Beyond that, though, it's just different when kids show up here. They should be welcomed and encouraged. That's a basic norm of kindness (that's also in the guidelines and is a more important standard we should all be held to).

Unfortunately it's easy for the opposite to happen. Matters of age and youth evoke strong emotions in people. Given the long tail dynamic of large internet forums, that can bring out a lot of strangeness and negativity [1]. People react out of associations from their own history that have nothing to do with the project the kid is sharing. It can easily turn into a many-sided WTF that makes the community seem weird, bitter, and nasty.

That's exactly the experience that HN should not be providing so we—both commenters and moderators—should take extra care to avoid it.

We should avoid it in the general case too, of course, but given that kids are more vulnerable, are (almost by definition) new here, and that the emotional associations that come up are stronger and more unpredictable, I think this is kind of a big deal.

[1] In case it isn't clear to someone what I mean by 'long tail dynamic': I mean that if (1) anyone can post a comment, and (2) the forum is large enough, then even if 99.9% of users have a completely positive reaction, the subset who for whatever reason have a negative reaction will still be large in number, and unfortunately these users are often the most motivated to comment. This dynamic affects every HN thread to the degree that a topic touches people's feelings (and what topic doesn't?) But it seems to particularly affect threads involving children or adolescents, and those are also occasions when this dynamic can do a lot of harm. Therefore these cases need special handling. It's not right for any of us to impose, however unintentionally, our own past difficulties on kids who are just being kids.


I appreciate your thoughtful explanation. Thank you.

*FYI, I don’t see anything other than “flagged” at the link you shared.


That's because it got flagged enough to become [dead], which means it's only visible to users who turn on the 'showdead' setting in their profile. If you turn that on, you'll be able to read the text.

All: if you turn 'showdead' on, please don't forget that you did so, because we sometimes get emails from people asking "how can you possibly condone $horrible-comment appearing on HN?" when in reality the account has been banned for years. (Not talking about this case, but it happens sometimes.)

p.s. and thanks for the kind reply, I appreciate it.


dang, I appreciate the long winded explanation and how you took control over this. Not just for being on my side, but that's exactly what people are missing when it comes to HN posting. They somehow pulled the hammer on me because I included my age in the title (which makes 40% of the case to my project). Everything i wrote here is original, and almost all of the feedback is seemingly positive/constructive for the good.

I get the feeling that if I didn't include my age (which, again it's the main thing) this submission wouldn't have received much attention. big thanks to learning copywriting beforehand.

Small clarification: I eat haters for a living.


Fair enough! Thanks @dang!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: