LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 01-23-2013, 10:07 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 282

Rep: Reputation: 17
Post How a computer works?


Hello Folks.
In your opinion which one of below books is good for learning how a computer works really :

1- Digital Design and Computer Architecture, Second Edition by David Harris and Sarah Harris

2- Inside the Machine: An Illustrated Introduction to Microprocessors and Computer Architecture by Jon Stokes

3- Structured Computer Organization (5th Edition) by Andrew S. Tanenbaum


Thank you.
 
Old 01-23-2013, 10:49 AM   #2
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Edit

Last edited by Thor_2.0; 01-28-2013 at 03:03 PM.
 
Old 01-23-2013, 02:13 PM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,329

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
All of these books, while very excellent books, are all very intense. Indeed, we'd all like to know what your objective is. (And a worthy objective it is!) Have you explored The World Wide Web for introductory material?
 
Old 01-23-2013, 02:21 PM   #4
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,612

Rep: Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414Reputation: 1414
Code, by Charles Petzold.
 
Old 01-24-2013, 05:44 AM   #5
myzoneajay
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Rep: Reputation: Disabled
I would recommend the 3rd one, Structured Computer Organization. I read it for my semesters, Good book.
 
Old 01-25-2013, 09:59 AM   #6
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
I'd like to join sundialsvcs and ask just what the goal is. We could explay up to any technical level how the thing works, but...will that answer your question?
 
Old 01-26-2013, 12:49 AM   #7
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 282

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Thor_2.0 View Post
For me it was "From chips to systems" by Rodnay Zaks, extremely outdated by today's standards, but it thought me what computers are, what a BIOS is (I even programmed extentions to the thing once) how software ends up being executed...the works...

By the way, why stick to these? What are your goals, byt he way? Building a computer? Just understanding?

Thor
Hi.
Thanks very much for your guidance.
I want to know how a computer works really and my goal is learning assembly language. In your opinion, is "Digital Design and Computer Architecture" good?
 
Old 01-26-2013, 03:30 AM   #8
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Edit

Last edited by Thor_2.0; 01-28-2013 at 03:04 PM.
 
Old 01-27-2013, 01:53 AM   #9
myzoneajay
LQ Newbie
 
Registered: Jan 2013
Posts: 7

Rep: Reputation: Disabled
If you want to learn assembly lang then start with 8085 or may be 8086 microprocessors books.
 
Old 01-27-2013, 04:20 AM   #10
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Quote:
If you want to learn assembly lang then start with 8085 or may be 8086 microprocessors books.
The Intel microcontroler? Forgot about that one, and yes, the better "entry vector"...I second this one...
 
Old 01-27-2013, 08:53 AM   #11
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,063

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Quote:
Originally Posted by jokar.mohsen View Post
how a computer works really
That is a deep hierarchy of topics, each very challenging. Consider the semi-conductor physics through which the junction in each semi-conductor component operates. A whole different set of physics is involved in the microscopic magnetic storage of data. You better know how to apply Maxwell's Equations to understand how the information flows among all those microscopic components without getting totally lost in cross talk, reflections and other capacitive and inductive effects. After all that you would have barely reached the bottom level of how computers really work.

Experts don't try to understand how something like a computer really works. An expert really understands a narrow sub topic within that, then has a general grasp of the surrounding sub topics and some vague idea about the challenges and results of the distant sub topics.

Quote:
and my goal is learning assembly language.
That is still more of a means than a goal.

How you learn assembly language depends a lot on why you want to learn it.

If you are (or intend to be) a software engineer, a very good reason to learn assembly language is to improve your abilities at designing and debugging software in high level languages. Even if you will never include any assembly source code in a final project, knowing how you could do that is very valuable for developing high level language code (especially C++).

If that is your purpose for leaning assembly language, then you should focus on learning a current CPU architecture (almost certainly X86-64) and on learning assembly programming in the form of functions called via a C interface.

Most books, tutorials, online advise, etc. on learning assembly focus on
1) Obsolete architectures, in theory because they are simpler, but really because they author's skills are obsolete.
2) Either whole programs in assembly or even stand-alone (from boot) code in assembly without benefit of an OS.
Many combine a little of (1) and (2) to focus on assembly programs in 16-bit x86 code to run under an MS-DOS emulator.

If you want to learn assembly in order to better understand current high level language software development, all the above is a massive waste.
For some other purposes for learning assembly, some of the above isn't as totally wasted, but it still isn't necessarily a good place to start.

For almost any reason for learning assembly, starting with a focus on assembly functions callable from C is a more gentle introduction without wasting time of useless side topics.

Quote:
Originally Posted by jokar.mohsen View Post
In your opinion which one of below books is good
I haven't looked at any computer book in years, and when I did look at computer books I was never impressed.
You learn to program by programming, not by reading about it.

A good online tutorial would help, but I don't know of one. As I said above, most focus on a really stupid way of introducing assembly.

Quote:
Originally Posted by Thor_2.0 View Post
keep in mind that there is NO safety net in pure assembly, in fact, you can easyly write straight into the OS and cripple your session, be prepared to restart often
I'm not sure what that nonsense is supposed to mean. If you write a "pure" assembly program in Windows or Linux, that program can accidentally write to exactly the same things that a C or C++ program can accidentally write to, which does NOT include the OS.
When you (a beginner) write a program, be prepared to get the program wrong many times, including sometimes hanging it in a way that needs a task manager or kill command (etc.) to stop it. But that is just the program, not the session. MS-DOS is obsolete. A real OS protects the rest of your session from almost all programming accidents and protects itself from all of them (unless you abuse root privileges).

Quote:
Originally Posted by myzoneajay View Post
If you want to learn assembly lang then start with 8085 or may be 8086 microprocessors books.
That is clearly a very popular idea among those giving advise for learning asm. It is still a very wrong idea. If you want to learn how to design heating systems, you don't begin by learning how to start a camp fire with a flint.

I tried to get my sons (while they were in Boy Scouts) to learn to start a camp fire with a flint. I also taught them quite a bit of computer programming and never any 16-bit x86 (much less 8085). Starting a camp fire with a flint is more worthwhile to learn today than 16-bit x86 asm.

Last edited by johnsfine; 01-27-2013 at 09:08 AM.
 
Old 01-28-2013, 01:20 AM   #12
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 282

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by johnsfine View Post
That is a deep hierarchy of topics, each very challenging. Consider the semi-conductor physics through which the junction in each semi-conductor component operates. A whole different set of physics is involved in the microscopic magnetic storage of data. You better know how to apply Maxwell's Equations to understand how the information flows among all those microscopic components without getting totally lost in cross talk, reflections and other capacitive and inductive effects. After all that you would have barely reached the bottom level of how computers really work.

Experts don't try to understand how something like a computer really works. An expert really understands a narrow sub topic within that, then has a general grasp of the surrounding sub topics and some vague idea about the challenges and results of the distant sub topics.



That is still more of a means than a goal.

How you learn assembly language depends a lot on why you want to learn it.

If you are (or intend to be) a software engineer, a very good reason to learn assembly language is to improve your abilities at designing and debugging software in high level languages. Even if you will never include any assembly source code in a final project, knowing how you could do that is very valuable for developing high level language code (especially C++).

If that is your purpose for leaning assembly language, then you should focus on learning a current CPU architecture (almost certainly X86-64) and on learning assembly programming in the form of functions called via a C interface.

Most books, tutorials, online advise, etc. on learning assembly focus on
1) Obsolete architectures, in theory because they are simpler, but really because they author's skills are obsolete.
2) Either whole programs in assembly or even stand-alone (from boot) code in assembly without benefit of an OS.
Many combine a little of (1) and (2) to focus on assembly programs in 16-bit x86 code to run under an MS-DOS emulator.

If you want to learn assembly in order to better understand current high level language software development, all the above is a massive waste.
For some other purposes for learning assembly, some of the above isn't as totally wasted, but it still isn't necessarily a good place to start.

For almost any reason for learning assembly, starting with a focus on assembly functions callable from C is a more gentle introduction without wasting time of useless side topics.



I haven't looked at any computer book in years, and when I did look at computer books I was never impressed.
You learn to program by programming, not by reading about it.

A good online tutorial would help, but I don't know of one. As I said above, most focus on a really stupid way of introducing assembly.



I'm not sure what that nonsense is supposed to mean. If you write a "pure" assembly program in Windows or Linux, that program can accidentally write to exactly the same things that a C or C++ program can accidentally write to, which does NOT include the OS.
When you (a beginner) write a program, be prepared to get the program wrong many times, including sometimes hanging it in a way that needs a task manager or kill command (etc.) to stop it. But that is just the program, not the session. MS-DOS is obsolete. A real OS protects the rest of your session from almost all programming accidents and protects itself from all of them (unless you abuse root privileges).



That is clearly a very popular idea among those giving advise for learning asm. It is still a very wrong idea. If you want to learn how to design heating systems, you don't begin by learning how to start a camp fire with a flint.

I tried to get my sons (while they were in Boy Scouts) to learn to start a camp fire with a flint. I also taught them quite a bit of computer programming and never any 16-bit x86 (much less 8085). Starting a camp fire with a flint is more worthwhile to learn today than 16-bit x86 asm.


Hello.
I'm grateful really for your useful guidance.
I want to Learn assembly langauge for Reverse engineering, Do you have any idea?
 
Old 01-28-2013, 05:54 AM   #13
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Edit

Last edited by Thor_2.0; 01-28-2013 at 03:04 PM.
 
Old 01-28-2013, 07:36 AM   #14
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 282

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Thor_2.0 View Post
ROFL! Ever addressed something out of the frame? Okay, granted, I'm from the era where you could "poke stuff" into the OS's memory space...
Anything above Assembler (C, C++, Java, whatever) is more or less governed by the OS, Assembly COULD bypass that...
Believe me, I've restarted enough to know

Honesty demands that I confess that I've written my own Assembler in my time, nothing fancy as today's standards, a bare editor, that could load, edit and save (print as well) the source, and convert the code into bytes (yes, folks: BYTES, I'm that old) and pop 'em anywhere YOU wanted, including OS space...

Thor
Do you have any idea about reverse engineering?
 
Old 01-28-2013, 07:39 AM   #15
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,063

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Quote:
Originally Posted by Thor_2.0 View Post
Anything above Assembler (C, C++, Java, whatever) is more or less governed by the OS, Assembly COULD bypass that...
You are simply wrong. In any environment, anything you can accidentally trash in asm, you could accidentally trash the same in C or C++.

In a real OS, such as Linux, the OS portion of each process's address space is protected against access. Whether you are using C or asm, you could execute an instruction telling the CPU to overwrite a byte of the OS, and that instruction would seg fault without actually overwriting any of the OS.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
port 22: no rote to host but in other computer it works!!!!! Please Help kfree Linux - Networking 5 10-26-2009 03:06 PM
Fedora Live USB Works on one computer but not on another FedoraLinuxLover Linux - Laptop and Netbook 70 08-05-2009 12:52 PM
flash no longer works after computer reboot sycamorex Linux - Software 1 09-07-2008 06:46 AM
Samba works with one windows computer, but not the other? MiniMe001 Linux - Networking 1 09-16-2006 05:39 PM
sata only works when computer is fully booted trscookie Ubuntu 2 04-23-2005 08:06 AM


All times are GMT -5. The time now is 05:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration