Say i have this 10,000,000 (10 million) byte file.

I want to perform multiplication,addition and few other operation on all those bytes(total of 5). And after it is done say if i want to repeat the addition and other operations on the same file like a loop,then

How many such instructions can i execute in a programming language like c++?

Also when they say instructions,does one instruction count as a operation on every bit or byte or does it mean an actuall addition operation ?? and how does cycles and hertz fit inside all of this ??

I really want to know how much a processor can compute in a second,so

Thankyou and have a new year..

Say i have this 10,000,000 (10 million) byte file.

I want to perform multiplication,addition and few other operation on all those bytes(total of 5). And after it is done say if i want to repeat the addition and other operations on the same file like a loop,then

How many such instructions can i execute in a programming language like c++?

Also when they say instructions,does one instruction count as a operation on every bit or byte or does it mean an actuall addition operation ?? and how does cycles and hertz fit inside all of this ??

I really want to know how much a processor can compute in a second,so

Thankyou and have a new year..

I can't give you actual numbers, but I can explain the theory for you...

MIPS and Hertz are semi-related but they are neither directly comparable nor equivalent units. I'll explain below...

A processor clock speed value of 1-Hz is 1 processor cycle per second. Therefore, if you have a 1.0GHz processor the processor completes approximately 1,000,000,000 (1-billion) cycles per second.

At the machine level, an instruction is a single binary code that sends a command to the processor. The minimum bit count of a single code is dependent on the processor's architecture, but is usually either 8- or 16- bits. A single high-level statement in a programming language (such as C++) may be represented by hundreds, or even thousands, of machine-level instructions.

All modern processors are capable of processing at least 32+ bits per clock cycle, and most can process 64 bits (how many are actually used depends on your O/S). Based on an average size of 8-bits per code/instruction, at 32 bits that is 4 instructions per cycle that the processor can execute. When you extend that out to a 1.0GHz processor, suddenly that becomes about 4,000,000,000 (4-billion) instructions per second. Since MIPS is short for Millions of Instructions Per Second you divide that number by 1,000,000 (1-million). So your MIPS value is about 4,000.

The actual numbers vary based on other technologies that the motherboard and processor have implemented such as hyper-threading, pipelining, multi-core, etc. but that's the basic idea.

I hope that helps.

Edited 6 Years Ago by Fbody: n/a

Just find the amound of hertz.

Not entirely true.
"CPU instruction rates are different to clock frequencies, usually reported in Hz, as each instruction may require several clock cycles to complete or may be capable of executing multiple independent instructions at once. Additionally, the number of cycles required for instructions to complete is dependent upon the instruction being executed."
-http://en.wikipedia.org/wiki/Million_instructions_per_second#Million_instructions_per_second

EDIT: Fbody beat me to it with a better explanation! :)

Edited 6 Years Ago by jonsca: n/a

This article has been dead for over six months. Start a new discussion instead.