Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Sorry for Long Question!

We say that CPU is the most sophisticated component of computers, but point to notice is that CPU can't translate program and understand it without the help of compilers. So I have three questions which are related with each other.

1) First Question

Understanding of CPU:-

Why do we call CPU the most intellectual component of computers if it can't work on its own? What is the logic behind it?

2) Second Question

Production of Compiler:-

Compiler is itself a computer program, so which type of language is used for making compilers, either High-Level Language or Low-Level Language? If compiler is made through High-Level Language then, will a compiler depend on other compiler for its implementations (and I don't High-Level Languages are used to make compilers)? If compiler is made through Low-Level Language then which type of Low-Level Language is used for its production? In addition, how compiler translate program according to the perception of CPU and Processor because there are different types of CPUs and Processors.

3) Third Question

How CPU and Processor is Written:-

I have read that processor and CPUs are written in some programming language. If it is true then which programming language is used for their modeling.
Posted
Updated 4-Jan-15 5:41am
v2
Comments
Andreas Gieriet 4-Jan-15 12:32pm    
If this is a homework assignment: read your text book ;-)
Cheers
Andi

You should read some books in order to get proper answers to your questions, anyway, let's try:
  1. Yes, the CPU (as its very name suggests) it's the brain of the computer. It doesn't need to understand high level programming languages (they help humans, not the hardware) but to execute efficiently low level machine code.
  2. First compilers were indeed hand-crafted (written using low level programming languages). Now there are several alternatives (see the Wikipedia page on "Compiler Bootstrap").
  3. Yes, hardware can be modeled using programming languages like, for instance, VHDL.
 
Share this answer
 
v2
Comments
Shaharyaar 4-Jan-15 13:29pm    
Thanks for Answer!
CPallini 4-Jan-15 16:28pm    
You are welcome.
Sergey Alexandrovich Kryukov 4-Jan-15 13:59pm    
I'm really sorry you decided to take these "questions" seriously. This is just idle talk making no sense at all.
Please see my answer.

Happy New Year!

—SA
CPallini 4-Jan-15 16:29pm    
Happy New Year, Sergey!
Sergey Alexandrovich Kryukov 5-Jan-15 0:26am    
Thank you, best wishes for you, your friends and relatives!
—SA
All questions are not real questions. The assumption that they have some answers tells me that they are formulated by people totally ignorant in the topics. I can easily proof that the questions are completely idiotic. Let me just tell you some thoughts.

#1. CPU is not "most intellectual". The statement is ridiculous not because something else is more intellectual (from the common sense, a log of things modeled on computer could be much more "intellectual"), but just because "intellectual" is not a defined category.

#3. No one can reasonably ask "what language is used" for modelling, because there are many suitable languages, and, at any time, new, even better language can be invented and implemented.

And so on… No need to waste any more time on this.

The questions are completely unreasonable and unrelated to anything sensible, no common sense, no computer science or software development practice. I call it "blah-blahology", idle talk. And hence, the whole thing is the educational fraud.

What to do? Give up the course or the whole school, sue the school for fraud. I have no idea what course of action would be realistic and what not, it depends on circumstances and your goals. Anyway, not learning the gibberish.

—SA
 
Share this answer
 
v2
Comments
Shaharyaar 4-Jan-15 14:23pm    
You have big career in Computer Science that's why you give me your qualitative according your experience.
As I wrote before writing these three Question that "My Questions are related with each other". So, as we know CPU is not able to know the semantics and syntax of Program directly, we use compiler so that CPU can implement source code or program. One more thing is that processor aids in the functioning of Machine as other components do. But my point is that how these all components including compiler work knowing each other functionality. For example, a person who speaks Spanish can't understand Russian Language. Similarly how these components collaborate so that efficient system is formed.
My problem is not that which part of machine is most intellectual. In addition, I wrote what type of language is used for making CPU, Processor and Compiler, in line from word 'type', I meant that what kind of language is used such as OOP Language, Functional Language and Logical Programming Language.
I think you didn't understand my questions properly but don't worry. I think I should ask questions with proper and easy detail.
Sergey Alexandrovich Kryukov 4-Jan-15 14:40pm    
You have only one problem: wasting time in learning fictional knowledge. I believe you are learning something useful and important, too, but this is not the case. It's useful to learn how CPU works, what it does, how to use it better, and so on, but comparing oranges with apple is just the idle talk.

If you really though that "problem is not that which part of machine is most intellectual", you would never mentioned "why do we call CPU the most intellectual component of computers". Who are "we"? Your fake teacher? If you pay money to your school, you are getting robbed, that's all. After all, what do you want from education? To look "clever enough" or to be able to do a work of an educated person?

—SA
Shaharyaar 5-Jan-15 6:32am    
You are absolutely right that I wrote "Why do we call CPU the most intellectual component of computers". But in the next line I also wrote "What is logic behind it".
I think first of all I should focus on programming language which I am learning then I will go for further learning on different aspects of computers. Anyway, I think you are right because as a Beginner to Programming Language, I am wasting my on learning these things.
Thank You Sergey!
Sergey Alexandrovich Kryukov 5-Jan-15 7:08am    
You are welcome.
—SA
I'll answer 2 first: Either. Both. The first compiler was written in assembler, and then re-written in the language and recompiled. It's normal to write a cross compiler (one that works on machine X by creates an executable for machine Y) and then compile the compiler with it to produce a compiler that runs on Y and produces code for Y.
Nobody (or almost nobody) uses low level languages to produce major software components: it takes too much time and is generally harder to maintain than the high level equivalent.

For the other two, you are confusing entities: While you can (do some do) "write" processors in a language that is executed on the "real" hardware (it's called Microcode[^]) it's not something you should think about too much unless you are planning on working for a big processor manufacturer - you can't write programs in the microcode and execute them yourself.

The CPU is compiler and language ignorant: it has no idea what language or compiler was used - it just processes a stream of binary data as machine instructions: in the same way they you "process words" without really caring if they come form a book, or a magazine, or a screen. Or even from a radio!
Trying to consider the processor in isolation and expecting it to be "the most important" is like trying to consider your brain in isolation - it doesn't work without your heart, and your lungs, and your liver, and blood, and bone, and skin, and eyes, and ears, and ...
The CPU is the same: without RAM, and a PSU, and input and output devices it can;t do anything either. So stop trying to "compartmentalise" the components and consider them as a system which works as a whole, together with the Operating system.
 
Share this answer
 
Comments
Shaharyaar 4-Jan-15 13:24pm    
It means, the whole system depends on its different components for efficient functioning. And Compilers are basically computer programs which can be made in their own computer programs. For Example, when Java Developer add new features to their Language they have to make compiler able to compile them for this purpose they can enhance javac (Java Compiler) in Java Language itself.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900