What capabilities MUST a CPU possess?

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
Hello,

What capabilities must a CPU have so that a computer can effectively implement software?

I compare CPUs to cars. Cars have a ton of bells and whistles: power locks, AC, power windows, etc. But you don't really need any of those things.

However, if you strip away enough things, eventually a car will cease to be a car. That is, there is a basic criteria a car needs to function and meet the definition an automobile.

So, what about CPUs? I think that there is a trend now to move software "on chip" and have CPUs and microprocessors do things that were previously within the realm of software.

But what "atomic" operations must exist on a CPU so that you can run software?

My layman's guess is that the CPU must have the ability to add in binary and make branch decisions.

What are your thoughts?
 

NTMBK

Lifer
Nov 14, 2011
10,269
5,134
136
Integer add, subtract and bitshift (multiply can be implemented by combining those). Memory load and store. Jump.
 

chrstrbrts

Senior member
Aug 12, 2014
522
3
81
Integer add, subtract and bitshift (multiply can be implemented by combining those). Memory load and store. Jump.

Thanks, but how would you implement branching (if statements and such) with the atomics you've mentioned?
 

Borkil

Senior member
Sep 7, 2006
248
0
0
5 stages

Instruction Fetch - CPU needs to know what instruction it is doing and what the next instruction is (Program counter)

Decode - CPU needs to understand what the instruction is and what steps it needs to take do execute it

Execute - Actually execute the instruction

Memory - Needs to have the ability to save results. (otherwise what's the point?)

Writeback - Saves the results into registers. Writeback is not "necessary" but using only memory is super slow.

http://en.wikipedia.org/wiki/Classic_RISC_pipeline
 

serpretetsky

Senior member
Jan 7, 2012
642
26
101
Central processors should genrally be touring complete.
http://en.wikipedia.org/wiki/Turing_completeness

NTMBK got the basic ones down. I think you are right, OP, in that you would also need to add a conditional jumping mechanism to that (not 100% sure about that).

However, there are far far more minimlistic touring complete instruction sets:
http://en.wikipedia.org/wiki/One_instruction_set_computer


5 stages

Instruction Fetch - CPU needs to know what instruction it is doing and what the next instruction is (Program counter)

Decode - CPU needs to understand what the instruction is and what steps it needs to take do execute it

Execute - Actually execute the instruction

Memory - Needs to have the ability to save results. (otherwise what's the point?)

Writeback - Saves the results into registers. Writeback is not "necessary" but using only memory is super slow.

http://en.wikipedia.org/wiki/Classic_RISC_pipeline
That really doesn't define the essence of a processor or a computer. That is a typical simplified architecture that we use.
 

Borkil

Senior member
Sep 7, 2006
248
0
0
Central processors should genrally be touring complete.
http://en.wikipedia.org/wiki/Turing_completeness

NTMBK got the basic ones down. I think you are right, OP, in that you would also need to add a conditional jumping mechanism to that (not 100% sure about that).

However, there are far far more minimlistic touring complete instruction sets:
http://en.wikipedia.org/wiki/One_instruction_set_computer



That really doesn't define the essence of a processor or a computer. That is a typical simplified architecture that we use.

But those are the abstract things that a cpu needs to be able to do. Without any one of those stages it won't be able to perform useful work. "Turing machines are not intended to model computers, but rather they are intended to model computation itself." from http://en.wikipedia.org/wiki/Turing_machine

NTMBK described functions that the execute stage needs to perform. Which is getting into the nitty gritty of the "engine" of the car.
 

serpretetsky

Senior member
Jan 7, 2012
642
26
101
But those are the abstract things that a cpu needs to be able to do. Without any one of those stages it won't be able to perform useful work.
I will agree with you that some of those stages really are necessary for the idea of a computer, but not all 5.

1) A computer needs to be able to accept and decode instructions from a user
2) A computer needs to be able to execute those instructions
3) A computer needs to be able to store the results in some sort of memory to give the result back to the user or continue executing more instructions on the data.

"Turing machines are not intended to model computers, but rather they are intended to model computation itself." from http://en.wikipedia.org/wiki/Turing_machine
that is true. However, I never specifically mentioned turing machines. I referred to turing completeness. Basically, any turing complete computer can perform the same computations that any other turing complete computer can. This includes, by the way, the turing machine. Most micropressors and all microcontrollers (i think?) are turing complete. GPU's only became turing complete recently with more advanced shaders.

NTMBK described functions that the execute stage needs to perform. Which is getting into the nitty gritty of the "engine" of the car.
I would argue the exact opposite. A programmer only cares about the instructions a CPU can execute. He really doesn't care that underneath the hood there are 5 stages. There could be 2 stages or 2000000 stages and it would make no difference to the programmer. He wants to make sure that the processor performs well, sure, but he doesn't really care HOW that is accomplished.

What you are describing, the 5 stages of a typical RISC architecture, is the engine under the hood. The instructions are the control mechanisms that the driver has access to. They define what functionality the programmer has access to and how he can control the mechanism.
 

KWiklund

Member
Oct 30, 2013
35
0
16
Thanks, but how would you implement branching (if statements and such) with the atomics you've mentioned?

You need a Program Status Register, which contains assorted status bits that may be used for branching (various arithmetic operations may cause these to be set of cleared). The conditional jump instruction determines whether or not to change the value of the program counter (PC) register based on the value of the corresponding status bit. The PC register contains the address of the next instruction. Under normal operation, it simply increments after each instruction is read. Loading it with a different address though will cause the program to "jump" to that address.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
http://en.wikipedia.org/wiki/Zero_instruction_set_computer
http://en.wikipedia.org/wiki/One_instruction_set_computer
Let's end all the instruction and pipeline issues right here .

As mentioned already, it can be determined by Turing completeness. Generally, hardware processors are not considered incomplete due to limited memory space, since peripheral IO features allow for very large data ranges to be handled, so long as enough of the intermediate value can be stored in the processor's own memory to keep processing (FI, a "places" offset, two current, "digits," and underflow/overflow/carry data, would be almost enough).
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |