Did programming change the way you think? - Page 6 - Overclock.net - An Overclocking Community
Forum Jump: 

Did programming change the way you think?

Reply
 
Thread Tools
post #51 of 58 (permalink) Old 07-07-2008, 11:50 AM
New to Overclock.net
 
Join Date: Sep 2007
Location: Pennsylvania
Posts: 4,159
Rep: 261 (Unique: 206)
Quote:
Originally Posted by rabidgnome229 View Post
A CPU can only do 4 things - it can do integer math, floating point math, logic (jump to another location), and read/write memory.

I thought all it did was ADD.

The last few days on this thread deserve this xkcd cartoon



hometoast is offline  
Sponsored Links
Advertisement
 
post #52 of 58 (permalink) Old 07-07-2008, 01:02 PM
New to Overclock.net
 
Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,282
Rep: 643 (Unique: 391)
Quote:
Originally Posted by hometoast View Post
I thought all it did was ADD.
Add, subtract, multiply, divide, bitwise shifts, AND, OR, XOR, NOT, compare, jump, move...

I think those are the micro ops although I may have missed something

rabidgnome229 is offline  
post #53 of 58 (permalink) Old 07-08-2008, 02:40 AM
New to Overclock.net
 
metala's Avatar
 
Join Date: Aug 2006
Location: Blagoevgrad, Bulgaria
Posts: 1,198
Rep: 48 (Unique: 43)
Quote:
Originally Posted by rabidgnome229 View Post
A CPU can only do 4 things - it can do integer math, floating point math, logic (jump to another location), and read/write memory.
I know, I have programmed in Assembly... also I have programmed in C for a ATMEGA8L (micro controller in chip with 8k SRAM).
One of the most important thing you forgot is the interrupt, which is something that you cannot classify as logical or mathematical or other like that thing.

"Alcohol is not the answer."
Milk is not the answer either, but nobody mentions it.

Gentoo worshipper, xterm is man's best friend.

metala is offline  
Sponsored Links
Advertisement
 
post #54 of 58 (permalink) Old 07-08-2008, 02:53 AM
New to Overclock.net
 
kurei's Avatar
 
Join Date: Jun 2008
Location: Delhi
Posts: 568
Rep: 55 (Unique: 42)
sure does... a friend of mine was once trying to solve a puzzle with three cannibals, three monks , a boat and a stream where you have to get them from one side to the other.... i solved it easily but then started to think in code and AI... that was how i got into robotics AI...that was my 2 cents worth....

Stupidity is on the rise, so is the planets population. I think we need to do away with the safety labels on electrical devices and let the problem resolve itself devil-smiley-019.gif

kurei is offline  
post #55 of 58 (permalink) Old 07-15-2008, 09:33 AM
New to Overclock.net
 
Coma's Avatar
 
Join Date: Jun 2007
Posts: 11,067
Rep: 760 (Unique: 559)
It caused me to think more analytically in general, and when looking at anything that has to do with programming I think about how it could be improved, and sometimes, I think whether this script has potential for an exploit.

I've actually found real exploits like this - for example, some WoW private servers use a system that reward voting on websites like xtremetop100.com.

You pick an item from a dropdown list, enter your character name, press a button - you're redirected to the voting website and the item is mailed to you.

The thing is that the person who wrote this script was trying to make it "flexible", so the item IDs are entered in the HTML form...

I looked up the PHP source just to make sure it really does it that way (just to save myself time in case it didn't), and woo. I'm surprised nobody's made the exploit public, since it's so simple.

You can get item IDs from websites like Thottbot and then just replace the IDs in the HTML form, and voila. You can even get GM items if you know one of the custom IDs.

When asking for help: state the goal, not the step.

Coma is offline  
post #56 of 58 (permalink) Old 07-15-2008, 09:50 AM
New to Overclock.net
 
Muhahahaha's Avatar
 
Join Date: Mar 2005
Location: California
Posts: 3,263
Rep: 162 (Unique: 125)
Quote:
Originally Posted by rabidgnome229 View Post
Add, subtract, multiply, divide, bitwise shifts, AND, OR, XOR, NOT, compare, jump, move...

I think those are the micro ops although I may have missed something
There are also lots of special multimedia instructions... ever heard of SSE, SSE2, SSE3, etc?

A CPU can be made to have any kind of instructions you want, really. It just depends on if Intel or AMD thinks a given instruction would be used often enough to actually be useful.

Smart Phone: Motorola Droid @ 1.2GHz
Current ROM: SholesMod 2.0.6 RC

poke.gifdevil.gifeek.gifdoh.gif
Muhahahaha is offline  
post #57 of 58 (permalink) Old 07-15-2008, 10:22 AM
New to Overclock.net
 
Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,282
Rep: 643 (Unique: 391)
Quote:
Originally Posted by Muhahahaha View Post
There are also lots of special multimedia instructions... ever heard of SSE, SSE2, SSE3, etc?

A CPU can be made to have any kind of instructions you want, really. It just depends on if Intel or AMD thinks a given instruction would be used often enough to actually be useful.
The SSE extensions are all SIMD instructions (single instruction multiple data). They perform the same operations, but on more than one chunk of data at a time

Anyway I was referring to micro ops, not x86 instructions

rabidgnome229 is offline  
post #58 of 58 (permalink) Old 07-18-2008, 11:35 AM
New to Overclock.net
 
kurei's Avatar
 
Join Date: Jun 2008
Location: Delhi
Posts: 568
Rep: 55 (Unique: 42)
Quote:
Originally Posted by rabidgnome229 View Post
The SSE extensions are all SIMD instructions (single instruction multiple data). They perform the same operations, but on more than one chunk of data at a time

Anyway I was referring to micro ops, not x86 instructions
you got that right.... x86 is architecture.... it doesnt change what micro instructions are flowing through.... every x86 instruction will finally be broken into these microops... the first one of these in PCs was MMX i think.... hyperthreading itself is a SIMD instance at a low level....

Stupidity is on the rise, so is the planets population. I think we need to do away with the safety labels on electrical devices and let the problem resolve itself devil-smiley-019.gif

kurei is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off