Question:
Computer Experts: Need help for book about computer working specifically languages (assembly etc.)?
SS
2011-10-19 12:53:33 UTC
Hello all,
I am learning C++ but I am not satisfied internally. I want to know the actual working of computer like when we put some input on C++ then it goes to compiler and converted into machine or assembly language, I want to know that working how all these things work.
When we press 'A' on our computer it displays on monitor, so how these happens? OK it's converted to binary code but how these binary codes made a machine(CPU and monitor) to show 'A'.

I want to study these very very basic workings and structures in detail, kindly those who are masters in this study or having appropriate knowledge tell me the book or anything else that can help me out.
Thanks alot :)
Four answers:
?
2011-10-22 23:53:48 UTC
It's nice you aren't satisfied. Knowing how a computer works inside is nice. Today, you have a lot more access to things than I did when I first built my own computer more than 35 years ago.



There is a great book called "Bebop BYTES Back: An Unconventional Guide to Computers" that would be well worth reading. You also may wish to find some older books, when it was still important to explain a lot of detail. The PDP-11 and PDP-8 guides were very explicit, for example. This was back when stacks done in hardware were fairly new. So they talked a lot about that.



One of the best (and my first) lessons came from something Bell Labs put out in the 1960's (late) called the Cardiac. It was a paper computer and you wrote a program but you also had to move the program counter around on your own and _you_ executed the instructions on paper. If your program worked, you got the results you wanted. Otherwise, you learned to change your program.



Computer Architecture classes are often taught at the 2nd year of CS degree, though sometimes in the 1st year. These will usually include some assembly language. A community college may also include some kind of "fake" computer that you need to program -- not unlike the above Cardiac. But you write your code in C or C++ to operate it. In fact, you might attempt something like that. Make up (or get a manual on a real microcontroller) an instruction set and then write some C++ code to emulate it. Then write your programs in that assembly language and test them. You will learn a lot that way.



Also, microcontrollers are VERY CHEAP these days. Texas Instruments, for example, will sell you a LaunchPad unit for $4.30, shipped if you are in the US. That gives you two microcontrollers, a USB cable, a board with buttons and LEDs, and so on. Lots you can learn there.



Compilers will often generate the assembly language for you into text files you can read. You may wish to read them, together with the manual for the instructions, and see where that takes you.



If you are really crazy about all this, you can even buy for very little money an FPGA board (field programmable gate array) that will let you use Verilog or VHDL to program (design) your own actual cpu. That gets downloaded into the hardware and it WILL execute what you programmed it to do and do it very fast like a real cpu. This gets you just about as close to the intimate details as you may ever want. And it is very cheap to do. Just a lot of work and learning. The Bebop book mentioned above will carry you far in that regard. But there is also very good books on writing such code by Douglas Smith, "HDL Chip Design Using VHDL or Verilog," if memory serves.



You also need to learn about the program model used by operating systems: namely something that includes code, constants, initialized static data, uninitialized static data, heap space, and stack space. If you get that part down, along with the idea of "activation frames" you will be far along in that road, as well.



Best of luck. But you are in a very nice world to learn this stuff today. Everything costs very little for you to go a very long distance in this.
michael
2011-10-19 12:58:51 UTC
For that type of information you will need to look for books on computer architecture. You can learn assembly but it may not help too much in some of the understanding, but it can help knowing how instructions are stores in memory.



I would also recommend learning about operating systems, compiler construction and automata theory would also be worth looking up
?
2011-10-19 13:13:55 UTC
There are, as far as I know, NO a-z how-a-computer-works books of any value. There are a lot of books for beginners and old people, but none that will walk you through a keypress in terms of both hardware and software.



Reading through books on the linux kernel will get close, especially when it comes to computers' booting processes.



ASSM is a good skill to know, and will help you understand how a processor works (which is all that books on computer architecture will really do), but it won't help you understand, for instance, how a graphics card helps balance processor load.
?
2016-09-11 02:54:03 UTC
"Any PC developed after 1985 has the garage potential to condo an evil spirit," the minister validated. Okay that more often than not sums up what we are handling right here. What's subsequent? Posessed microwaves, stitching machines, and refrigerators? F*ck me under the influence of alcohol!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...