Three layer question.

• October 15th, 2012, 03:02 PM
Zalvager
Three layer question.
Imagine that there are three layers in a computer:

Layer 1: X
Layer 2: CPU/Motherboard
Layer 3: Assembly

Assuming that it is a Windows machine, I will use Assembly.

What is X?
• October 16th, 2012, 02:00 AM
TimeSpaceLightForce
If Layer 3: Assembly has keyboard,monitor,mouse,etc
whlie Layer 2: CPU/Mbord assumed to contain built in sound/internet/video card
then X would be casing, power supply,RAM and HDD
• October 16th, 2012, 03:42 AM
Strange
Quote:

Originally Posted by Zalvager
Imagine that there are three layers in a computer:

Layer 1: X
Layer 2: CPU/Motherboard
Layer 3: Assembly

Assuming that it is a Windows machine, I will use Assembly.

What is X?

As some who has spent decades designing microprocessors, building computers and writing software ... I have no idea what the question even means. :)

Could you clarify a couple of things:
a) Is 1 the highest layer or the lowest?
b) By "assembly" do you mean the mechanical assembly or assembly language?

Even making some assumptions about these, I only have some random guesses what X could be. Do you have any more context?
• October 16th, 2012, 05:09 AM
Zalvager
Quote:

Originally Posted by Strange
Quote:

Originally Posted by Zalvager
Imagine that there are three layers in a computer:

Layer 1: X
Layer 2: CPU/Motherboard
Layer 3: Assembly

Assuming that it is a Windows machine, I will use Assembly.

What is X?

As some who has spent decades designing microprocessors, building computers and writing software ... I have no idea what the question even means. :)

Could you clarify a couple of things:
a) Is 1 the highest layer or the lowest?
b) By "assembly" do you mean the mechanical assembly or assembly language?

Even making some assumptions about these, I only have some random guesses what X could be. Do you have any more context?

I truly apologize if I wasn't clear enough. What I really meant to ask was how it works physically.
• October 16th, 2012, 05:31 AM
Strange
Quote:

Originally Posted by Zalvager
I truly apologize if I wasn't clear enough. What I really meant to ask was how it works physically.

Uhm... How what works physically? I'm afraid I'm still not sure what you are asking.
• October 16th, 2012, 05:33 AM
Zalvager
Quote:

Originally Posted by Strange
Quote:

Originally Posted by Zalvager
I truly apologize if I wasn't clear enough. What I really meant to ask was how it works physically.

Uhm... How what works physically? I'm afraid I'm still not sure what you are asking.

The processor itself. How does it physically interact with the other hardware and the 0's and 1's?
• October 16th, 2012, 05:52 AM
Strange
Quote:

Originally Posted by Zalvager;359215T
he processor itself. How does it physically interact with the other hardware and the 0's and 1's?

Ah, I see. Big question! Probably too big for me to tackle in any depth. It would probably help to know how much you understand already. But to get you started ...

A microprocessor (CPU) contains a number of subsystems that are involved in fetching and executing instructions, plus hardware for interfacing to the outside world.

There is an Instruction Fetch unit. This generates memory addresses and fetches the instruction from that location in memory. When the processor is reset, the Instruction Fetch typically starts fetching instructions from some predetermined address (e.g. address 0).

The fetched instructions are decoded by looking at various fields in the instruction word to work out what type of instruction it is (e.g. load/store, arithmetic, branch, IO, etc), which specific operation of that class (add, sub, or, mul, etc), what the operands (i.e. the data to be operated on. The operands can be immediates (numbers encoded directly in the instruction), register numbers, memory addresses, etc.

If the operands are memory addresses then the data will be fetched from memory.

Then the operation and the operands will be passed on to the execution unit. This will perform the actual operation on the data. For example, if it is an "add" instruction, it will add the operands, if it is a branch instruction it will pass the new address to the fetch unit. And so on.

Hope that helps a bit. You probably need to find a good book to describe the details (I'm afraid I can't recommend one as it is too long since I learned all this stuff!) But if you have any immediate questions, let me know and I'll see what I can do.
• October 16th, 2012, 05:56 AM
Zalvager
Quote:

Originally Posted by Strange
Quote:

Originally Posted by Zalvager;359215T
he processor itself. How does it physically interact with the other hardware and the 0's and 1's?

Ah, I see. Big question! Probably too big for me to tackle in any depth. It would probably help to know how much you understand already. But to get you started ...

A microprocessor (CPU) contains a number of subsystems that are involved in fetching and executing instructions, plus hardware for interfacing to the outside world.

There is an Instruction Fetch unit. This generates memory addresses and fetches the instruction from that location in memory. When the processor is reset, the Instruction Fetch typically starts fetching instructions from some predetermined address (e.g. address 0).

The fetched instructions are decoded by looking at various fields in the instruction word to work out what type of instruction it is (e.g. load/store, arithmetic, branch, IO, etc), which specific operation of that class (add, sub, or, mul, etc), what the operands (i.e. the data to be operated on. The operands can be immediates (numbers encoded directly in the instruction), register numbers, memory addresses, etc.

If the operands are memory addresses then the data will be fetched from memory.

Then the operation and the operands will be passed on to the execution unit. This will perform the actual operation on the data. For example, if it is an "add" instruction, it will add the operands, if it is a branch instruction it will pass the new address to the fetch unit. And so on.

Hope that helps a bit. You probably need to find a good book to describe the details (I'm afraid I can't recommend one as it is too long since I learned all this stuff!) But if you have any immediate questions, let me know and I'll see what I can do.

Haha, I already knew that! But it's alright, it is a tricky question for sure.

Oh, and it's good to know that some Stranger(hehe) will help me at any time. :D
• October 16th, 2012, 06:06 AM
Strange
Quote:

Originally Posted by Zalvager
Haha, I already knew that! But it's alright, it is a tricky question for sure.

OK. So what bit don't you get? Is it more about the hardware interface between CPU and memory/peripherals or ...

Quote:

Oh, and it's good to know that some Stranger(hehe) will help me at any time.
I do what I can ...
• October 16th, 2012, 06:09 AM
Zalvager
Quote:

Originally Posted by Strange
Quote:

Originally Posted by Zalvager
Haha, I already knew that! But it's alright, it is a tricky question for sure.

OK. So what bit don't you get? Is it more about the hardware interface between CPU and memory/peripherals or ...

Quote:

Oh, and it's good to know that some Stranger(hehe) will help me at any time.
I do what I can ...

The part I don't get? Well, when you freeze water, it turns into ice. When you put a CPU inside a motherboard, which is connected to all the other jazz, it suddenly processes numbers. Why does water become ice(metaphor)?
• October 16th, 2012, 06:31 AM
Strange
Quote:

Originally Posted by Zalvager
When you put a CPU inside a motherboard, which is connected to all the other jazz, it suddenly processes numbers. Why does water become ice(metaphor)?

Because that is what it is designed to do? You understand that there are individual instructions which fetch and operate on data, right? So a program just consists of a sequence of these instructions. The CPU can't do anything except start executing instructions once it is turned on. It starts by executing a "bootstrap" sequence to initialise everything, then a "loader" to load the operating system. Then the OS loads and runs whatever applications you want. All of these are just ways of controlling the instructions fed to the CPU (which is a dumb puppy that just continually says, "OK, I executed that one. Give me another! Gimme another! Another!").
• October 16th, 2012, 10:46 AM
TimeSpaceLightForce
I think i know now. Thanks
• October 16th, 2012, 10:51 AM
Strange
Quote:

Originally Posted by Zalvager
The processor itself. How does it physically interact with the other hardware and the 0's and 1's?

Or, do you mean, how does the processor get an instruction consisting of 0s and 1s and know that it needs to add two numbers ... and then how does it take two more sets of 0s and 1s and actually add them together?

If so, then the easy answer is: digital logic. (But that hides a world of detail, obviously.)