Thread Closed

How many instructions are there ?

 
Share Thread Thread Tools
May14-07, 03:04 PM   #1
 

How many instructions are there ?


I was trying to figure out how many instructions there are in the world. Now cobol is said to have 100 billion lines of code and I guess all the other languages combined could reach maybe 100 billion lines of code. All other languages include fortran, c, c++, java, basic, and all the microcontroller programs written in assembler.

Now that is without repetition. I mean that is considering just one sample of each distinct program. So maybe 200 billion lines of code, translated into assembler then may reach A TRILLION LINES OF ASSEMBLY LANGUAGE IN ALL!

Now if you consider repetition you can reach 10 to the 18 lines of assembler code in the whole world. Wow, that is alot of code floating around.

Now who on earth is going to maintain and take care of it all ?

I like big numbers, so sometimes I try to calculate how many equivalent IBM PCs of computer power is currently installed in the world. If you consider that the 1981 model could do 300 thousands instructions per second, today you could maybe estimate at least 100 times that for each PC. SO there are a billion computers in the world today so you get 100 billion equivalent IBM PCs of computing power floating around in the world. WOW! that is alot!

If you consider that the first basic programs that just opened a file and printed out all the lines containing a string with the famous INSTR($Target,$Pattern) instruction could already be done for a few thousand records in 1981, THAT IS TO SAY THAT 90 % OF ALL REAL SOFTWARE PROBLEMS WERE ALREADY SOLVED IN 1981 ON THE SIMPLE IBM PC WITH THAT GREAT LANGUAGE CALLED BASIC, you can see how much excess capacity is just hanging around. All software problems have been basically solved already in the early 1980s.

Today the same problem is solved in DOS by executing this simple program in perl:


c:\>perl -ane"print if/put your pattern in here/" inputfile

you can also naturally run it off a unix prompt. So most software has been done in one line....
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> King Richard III found in 'untidy lozenge-shaped grave'
>> Google Drive sports new view and scan enhancements
>> Researcher admits mistakes in stem cell study
May14-07, 04:53 PM   #2
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
Most software problems were solved in BASIC in 1981... Right. Because 90% of all software problems are just pattern matching in text. Riiiight. Who are you trying to kid, oldtobor?

- Warren
May15-07, 08:14 PM   #3
 
Hmm, I'd have to disagree with you Oldtobor. New problems are emerging in computing every day, and BASIC is probably one of the worst languages ever devised; things started getting good when C was developed.

What does it matter how much code is out there? None of it will be maintained forever, it will all be discarded and replaced by new, more capable code. People work that way too, you know?

You remind me of those people that say modern medicine hasn't done anything positive for humanity. But here we are living, on average, twice what we used to.

Good grief.

- Old MacDonald
May16-07, 01:25 AM   #4
 

How many instructions are there ?


Actually it is the exact opposite: Basic was (and still is, there are alot available on the internet to download) a very good language, that is why people used it to program during the 1980s and until the early 1990s on PCs.

Just some programmers were disorganized and created sloppy code. Just because one guy said Basic was bad, everyone started saying the same thing, what clueless people!

And actually turbo pascal was even better, AND IT WAS WHEN C STARTED TO BECOME POPULAR THAT IT STARTED TO BECOME HARDER TO PROGRAM. C SUCKS, IT IS USELESSLY HARD! The same programs I could do in an hour in pascal took many more to do in C because of the crappy pointers, memory management etc. What crap, and C++ is even worse! Java and object oriented programming is a huge PILE OF HYPE! That is why there are still 100 billion lines of cobol, because good programs are created with easy languages.


Now back to the main topic:

Since there are a trillion instructions in the world, how are you going to show ballmer that you didn't copy some of them to create linux ? so he wins and linux becomes just another Microsoft product.

Aside from the fact that ballmer probably wrote linux too back in 1990, and trovalds (the finnish communist) just stole his code.

Now lets bring this up to another level. How many transistors are there in the world ? so a cpu can have a millon, so you get 10 to the 15 transistors, but then you must consider that there are a trillion electronic machines in the world; look at your washing machine, refrigerator, car, watch etc.

So then maybe 10 to the 18 transistors. WOW!, the same number as assembler instructions ? no, something must be wrong.

THIS IS ALL CALLED EXCESS CAPACITY.
May16-07, 02:00 AM   #5
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
Oh, I get it. You're not trying to make a valid point about anything -- you're just insane.

Let's examine your insanity, bit by bit.

People used BASIC in the 1980's because it is the best language that has ever existed (having nothing to do with the fact that better languages did not yet exist).

Object oriented programming is a "pile of hype" because of crappy pointers (even though many object oriented languages don't have pointers).

There are more lines of Cobol than any other language because Cobol is better than all other languages (even though Cobol was just one of the first languages in existence).

Ballmer wrote Linux in 1990, and Torvalds stole it (even though Ballmer isn't a programmer, Torvalds wrote the original Linux kernel from scratch, and Microsoft has never produced a Unix-like operating system).

Because there are almost as many transistors as instructions in the world, we have loads of excess capacity (even though the number of transistors and the number of instructions have no causal relationship to one another).

Gee, oldtobor... it almost seems like all you ever do on PF is post incoherent rants about how things were better so long ago than they are now. Oddly, you're using a modern web browser running on a graphical operating system, connected nearly instantaneously to thousands of people all around the globe to do it.

- Warren
May16-07, 03:56 AM   #6
 
Quote by chroot View Post
Ballmer wrote Linux in 1990, and Torvalds stole it (even though Ballmer isn't a programmer, Torvalds wrote the original Linux kernel from scratch, and Microsoft has never produced a Unix-like operating system).
Microsoft wrote XENIX.

Now lets bring this up to another level. How many instructions have been executed since 1945 ? so a billion computers running a million instructions per second would make 10 to the 15. Multiply to 10 to the 7 seconds and you get 10 to the 22 instructions have been executed in the world. WOW! that is alot of instructions:

THAT IS CALLED EXCESS CAPACITY.
May16-07, 07:38 AM   #7
 
Recognitions:
Science Advisor Science Advisor
FYI, a processor needs to always run an instruction, all the time. When there's nothing to run it runs an empty instruction.

What would be a waste is to have it run empty instructions instead of running something useful.
May16-07, 01:27 PM   #8
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
Quote by oldtobor View Post
Microsoft wrote XENIX.
No, it didn't. Microsoft bought it from AT&T. Your facts are always wrong.

- Warren
May16-07, 02:13 PM   #9
D H
 
Mentor
How many instructions are there? Just one. The proof:
Code:
#include </dev/tty>
Invoke the compiler, carefully prepare user inputs, and—voilà!—a program that plays chess. Do it again, and presto changeo, an accounting program.
May16-07, 02:34 PM   #10
 
Recognitions:
Gold Membership Gold Member
And actually turbo pascal was even better, AND IT WAS WHEN C STARTED TO BECOME POPULAR THAT IT STARTED TO BECOME HARDER TO PROGRAM. C SUCKS, IT IS USELESSLY HARD! The same programs I could do in an hour in pascal took many more to do in C because of the crappy pointers, memory management etc. What crap, and C++ is even worse! Java and object oriented programming is a huge PILE OF HYPE! That is why there are still 100 billion lines of cobol, because good programs are created with easy languages.
You take so long to program in C becuase you cannot program in C properly. Take some time and become proficient in the language.
A Basic programmer claiming that C sucks...

Your thread is useless. An you claim that Linus is a communist...I pity your ignorance.
Now lets bring this up to another level. How many instructions have been executed since 1945 ? so a billion computers running a million instructions per second would make 10 to the 15. Multiply to 10 to the 7 seconds and you get 10 to the 22 instructions have been executed in the world. WOW! that is alot of instructions:
Can't you write exponents properly?
May16-07, 03:48 PM   #11
 
Quote by oldtobor View Post
And actually turbo pascal was even better, AND IT WAS WHEN C STARTED TO BECOME POPULAR THAT IT STARTED TO BECOME HARDER TO PROGRAM. C SUCKS, IT IS USELESSLY HARD!
What? Let's not confuse C's difficulty with your inability.

Quote by oldtobor View Post
The same programs I could do in an hour in pascal took many more to do in C because of the crappy pointers, memory management etc. What crap, and C++ is even worse!
That comparison only shows that you aren't a very good programmer.
What you can do in an hour in Pascal or BASIC is by no means comparable to what I, for example, can do in C in an hour.

Here is an example of about an hours worth of experimentation in C:


It's a nifty little fluid surface dynamics simulator. Check out my home page for the much more mature version. It won't run on an old IBM PC though.

Quote by oldtobor View Post
Java and object oriented programming is a huge PILE OF HYPE! That is why there are still 100 billion lines of cobol, because good programs are created with easy languages.
Well you are half right, Java is a lot of hype. I mean it's better than BASIC and can be quite powerful in the hands of a good programmer (as can any tool). But it's not the solution to world hunger, contrary to popular belief.

Good programs are created by good programmers, regardless of the language (tool) they choose to use; the language has nothing to do with it.


- Old MacDonald

P.S. Though COBOL may have been a good language for the time and purpose it was created, it is by no means a good language now. Anything that COBOL can do, Python can do better. And that's not including all of the things that Python (and other modern tools) can do that COBOL simply cannot.
May16-07, 05:31 PM   #12
 
Blog Entries: 2
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
This thread cracks me up
May16-07, 07:08 PM   #13
 
Recognitions:
Science Advisor Science Advisor
Why is Java alot of hype again?
May16-07, 08:17 PM   #14
 
Java is aggrandized as some major revolution in computing by a lot of people and organizations. It's not a bad technology, but it's not some supreme answer for everything under the sun.

The fact that it's easier for new programmers is great, but I think they tend to view it with cult reverence, which is silly. I used be in that camp at one time, even. But then I grew up and realized that there are better tools. Plus, there is nothing better than C/C++ for low-mid level programming.
May16-07, 08:32 PM   #15
 
Recognitions:
Gold Membership Gold Member
Science Advisor Science Advisor
Retired Staff Staff Emeritus
Quote by eieio View Post
The fact that it's easier for new programmers is great, but I think they tend to view it with cult reverence, which is silly. I used be in that camp an one time, even. But then I grew up and realized that there are better tools. Plus, there is nothing better than C/C++ for low-mid level programming.
In other words, he was a Java cheerleader until I introduced him to Python. Now he's a Python cheerleader.

- Warren
May16-07, 09:05 PM   #16
 
Mentor
Anyone ever play Yeager 2.0 on an old IBM PC? That remains the best flight simulator of all time...
May16-07, 09:10 PM   #17
 
Quote by chroot View Post
In other words, he was a Java cheerleader until I introduced him to Python. Now he's a Python cheerleader.

- Warren
Touché Warren, even if it is a bit of an anachronism.
Thread Closed
Thread Tools


Similar Threads for: How many instructions are there ?
Thread Forum Replies
Latex instructions Forum Feedback & Announcements 4
instructions (computer) Engineering, Comp Sci, & Technology Homework 3
Instructions for TI-83 for probabilities Set Theory, Logic, Probability, Statistics 2
Saddam's Video Coded Instructions Current Events 11