r/geek • • Mar 19 '17

When you write bad code that works.

24.0k Upvotes

377 comments sorted by

View all comments

Show parent comments

4

u/unclerummy Mar 20 '17

If you're really interested, check out Charles Petzold's Code. He starts with a simple on/off switch, then shows you how those can be combined to create a logic gate, then how gates can be combined to create adders, and so on, all the way up to 80's-era CPUs.

I don't remember if he gets into more advanced features like predictive execution and vector processing, but it's still an excellent ground-up explanation of how these things actually work.

2

u/[deleted] Mar 20 '17

Really cool. If/when I have the time, this will be fun to learn about.

2

u/punking_funk Mar 20 '17

I'm studying computer science and really struggle to visualise how a processor actually exists (they kind of just explained logic gates and binary and then said "now you have a processor!").

Full adders blew my mind though when we learnt about them, like, we're doing sums with inanimate objects now?

Edit: I forgot to say this book seems kind of cool going to seek out a copy of it