1

In my quest for getting some basics down before I start going into programming I am looking for essential knowledge about how the computer works down at the core level.

I have a theory that actually understanding what for instance a stackoverflow let alone a stack is, instead of my sporadic knowledge about computer systems, will help me longer term.

Is there any books or sites that take you through how processors are structured and give a holistic overview and that somehow relates to good to know about digital logic?

Am i making sense?

ThomPete
  • 155
  • 1
  • 9
  • *"Am i making sense?"* - Yes and no. Yes, I understand what you are saying. But no, I do not think it will help you understand programming ... – Stephen C Feb 07 '14 at 08:18

5 Answers5

1

Yes, you should read some topics of

John L. Hennessy & David A. Patterson, "Computer Architecture: A quantitative Approach"

It has microprocessors' history and theory , (starting with RISC archs - MIPS), pipelining, memory, storage, etc.

David Patterson is a Professor of Computer of Computer Science on EECS Department - U. Berkeley. http://www.eecs.berkeley.edu/~pattrsn/

Hope it helps, here's the link

jose
  • 2,733
  • 4
  • 37
  • 51
1

Tanenbaum's Structured Computer Organization is a good book about how computers work. You might find it hard to get through the book, but that's mostly due to the subject, not the author.

However, I'm not sure I would recommend taking this approach. Understanding how the computer works can certainly be useful, but if you don't really have any programming knowledge, you can't really put your knowledge to good use - and you probably don't need that knowledge yet anyway. You would be better off learning about topics like object-oriented programming and data structures to learn about program design, because unless you're looking at doing embedded programming on very limited systems, you'll find those skills far more useful than knowledge of a computer's inner workings.

Michael Madsen
  • 54,231
  • 8
  • 72
  • 83
  • I can do basic programming PHP, AS3 even worked OOP with Lingo back in the Director days. So I know the basics of loops if/then statements etc. But I always feel like I am missing something – ThomPete Jan 12 '10 at 11:41
1

In my opinion, 20 years ago it was possible to understand the whole spectrum from BASIC all the way through operating system, hardware, down to the transistor or even quantum level. I don't know that it's possible for one person to understand that whole spectrum with today's technology. (Years ago, everyone serviced their own car. Today it's too hard.)

Some of the "layers" that you might be interested in:

John
  • 6,701
  • 3
  • 34
  • 56
1

It's pretty simple really - the cpu loads instructions and executes them, most of those instructions revolve around loading values into registers or memory locations, and then manipulating those values. Certain memory ranges are set aside for communicating with the peripherals that are attached to the machine, such as the screen or hard drive.

Back in the days of Apple ][ and Commodore 64 you could put a value directly in to a memory location and that would directly change a pixel on the screen - those days are long gone, it is abstracted away from you (the programmer) by several layers of code, such as drivers and the operating system.

You can learn about this sort of stuff, or assembly language (which i am a huge fan of), or AND/NAND gates at the hardware level, but knowing this sort of stuff is not going to help you code up a web application in ASP.NET MVC, or write a quick and dirty Python or Powershell script.

There are lots of resources out there sprinkled around the net that will give you insight into how the CPU and the rest of the hardware works, but if you want to get down and dirty i honestly think you should buy one of those older machines off eBay or somewhere, and learn its particular flavour of assembly language (i understand there are also a lot of programmable PIC controllers out there that might also be good to learn on). Picking up an older machine is going to eliminate the software abstractions and make things way easier to learn. You learn way better when you get instant gratification, like making sprites move around a screen or generating sounds by directly toggling the speaker (or using a PIC controller to control a small robot). With those older machines, the schematics for an Apple ][ motherboard fit on to a roughly A2 size sheet of paper that was folded into the back of one of the Apple manuals - i would hate to imagine what they look like these days.

slugster
  • 49,403
  • 14
  • 95
  • 145
0

While I agree with the previous answers insofar as it is incredibly difficult to understand the entire process, we can at least break it down into categories, from lowest (closest to electrons) to highest (closest to what you actually see).

Lowest Solid State Device Physics (How transistors work physically) Circuit Theory (How transistors are combined to create logic gates) Digital Logic (How logic gates are put together to create digital functions or digital structures i.e. multiplexers, full adders, etc.) Hardware Organization (How the data path is laid out in the CPU, the components of a Von Neuman machine -> memory, processor, Arithmetic Logic Unit, fetch/decode/execute) Microinstructions (Bit level programming) Assembly (Programming with words, but directly specifying registers and takes forever to program even simple things) Interpreted/Compiled Languages (Programming languages that get compiled or interpreted to assembly; the operating system may be in one of these) Operating System (Process scheduling, hardware interfaces, abstracts lower levels) Higher level languages (these kind of appear twice; it depends on the language. Java is done at a very high level, but C goes straight to assembly, and the C compiler is probably written in C) User Interfaces/Applications/Gui (Last step, making it look pretty)

You can find out a lot about each of these. I'm only somewhat expert in the digital logic side of things. If you want a thorough tutorial on digital logic from the ground up, go to the electrical engineering menu of my website:

affablyevil.wordpress.com

I'm teaching the class, and adding online lessons as I go.