WrongPlanet.net
WP Members: > 70,000

Aspie Affection

New Today: 20
New Yesterday: 30

A question for the computer geeks...
Post new topic   Reply to topic    Wrong Planet Autism Forum Index -> Computers, Math, Science, and Technology     
UnLoser
Phoenix
Phoenix


Joined: Mar 29, 2012
Posts: 623

PostPosted: Mon Jun 25, 2012 7:46 pm    Post subject: A question for the computer geeks... Reply with quote

(And I mean the word "geek" in the nicest way possible. Yes, I am a geek myself.)

So I was wondering how executable files can run on so many different computers. Don't different processors have different instruction sets? So how does one Windows .exe run on every computer that supports Windows? Is Windows only compatible with a certain series of processors? Or are .exe files actually some sort of intermediate code that needs to be compiled at runtime?

It would be nice if someone could explain this to me.
Back to top
View user's profile Send private message
noname_ever
Phoenix
Phoenix


Joined: Dec 26, 2011
Posts: 500
Location: Indiana

PostPosted: Mon Jun 25, 2012 8:34 pm    Post subject: Reply with quote

Many processors that run Windows share common instruction sets like the x86 instruction set.

If you're curious about executable file formats, start here.
https://en.wikipedia.org/wiki/EXE

Windows is only compatible with a small number of processors at the moment (the popular ones from Intel and AMD) and those implement the same instruction sets. There used to be PPC and Alpha ports of Windows as well.

Note: That there is Windows CE that have worked on ARM processors all along, but that is yet a different build than the one listed above for desktop processors.
Back to top
View user's profile Send private message
redrobin62
Phoenix
Phoenix


Joined: Apr 03, 2012
Age: 50
Posts: 3852
Location: Seattle, WA

PostPosted: Mon Jun 25, 2012 10:25 pm    Post subject: Reply with quote

Processors do have instruction sets (RISC, etc) but I wonder if your question is related to OS and/or the particular program itself. My computer has two OS's, Windows 8 and Ubuntu 12.04. They're using the same CPU but an exe from Windows won't work on Ubuntu. Similarly, the setup files from my Spectare USB TV tuner that worked on m W7 system doesn't work on my current W8.
_________________
If you think he's eloquent now just wait till he's sober!
His blog: http://seattlewordsmith.wordpress.com/
Back to top
View user's profile Send private message
Fogman
Econo-class Iconoclast
Phoenix


Joined: Jun 20, 2005
Age: 46
Posts: 3178
Location: Ноуя Англия

PostPosted: Tue Jun 26, 2012 11:00 am    Post subject: Re: A question for the computer geeks... Reply with quote

UnLoser wrote:
(And I mean the word "geek" in the nicest way possible. Yes, I am a geek myself.)

So I was wondering how executable files can run on so many different computers. Don't different processors have different instruction sets? So how does one Windows .exe run on every computer that supports Windows? Is Windows only compatible with a certain series of processors? Or are .exe files actually some sort of intermediate code that needs to be compiled at runtime?

It would be nice if someone could explain this to me.


Differant processors have differant instruction sets, but the ones from AMD and Intel are all x86 archetecture, so therefore, the instruction set is x86. IA64, OTOH is a 64 bit EPIC processor that is capable of executing x86 instructions in emulation. The now defunct Transmeta processor archetecture was a 32 bit EPIC chip that was designed to execute x86 instructions via hardware level emulation. RISC processors such as MIPS, SPARC, and PowerPC are all capable of executing x86 instructions via either VM software, or emulation software, though there will be a performace hit, due to the overhead of the software.

Conversely, there was emulation software for x86 that was capable of running 1st Gen Playstation games. MAME is a VM capable of running old arcade games coded for the original 68K processors, and I think there are emulators still available to run 68K Mac apps and older PowerPC apps on x86 processors of at least the 486/586 generations.

There was a version of WinNT4 that ran natively on Alpha 64 bit RISC processors briefly in the late '90's, but it's long since gone, as is the Alpha processor.

The real compatibility/ and incompatability issues of software are which processors the software source code is optimised and ultimately compiled for. --If you have no idea of the hardware specifics, then it's hard to optimise and compile code for a specific class of processors. --An example of this is when Be Inc. developed an OS for PPC Macs that had pre-emptive multitasking and multithreading. It ran fine on Older PowerPC Macs, but when Apple started using the G series processors, they refused to give the specifics of the processor archetecture to Be due to the fact that they didn't want people installing what was a vast improvement over the OS that Apple provided. This led to BeOS being ported to x86.
_________________
"When there's no 'there' to get to, we're so there!"
Back to top
View user's profile Send private message
Aquais94
Tufted Titmouse
Tufted Titmouse


Joined: Oct 13, 2012
Age: 18
Posts: 45
Location: Canada

PostPosted: Tue Jan 01, 2013 5:49 pm    Post subject: Reply with quote

noname_ever wrote:
Many processors that run Windows share common instruction sets like the x86 instruction set.

If you're curious about executable file formats, start here.
https://en.wikipedia.org/wiki/EXE

Windows is only compatible with a small number of processors at the moment (the popular ones from Intel and AMD) and those implement the same instruction sets. There used to be PPC and Alpha ports of Windows as well.

Note: That there is Windows CE that have worked on ARM processors all along, but that is yet a different build than the one listed above for desktop processors.


Do you Know, The new version of Windows (Windows 8 ) can run ARM Processor (for Windows RT only).
Back to top
View user's profile Send private message
RazorEddie
Phoenix
Phoenix


Joined: Jan 19, 2012
Age: 42
Posts: 608

PostPosted: Tue Jan 01, 2013 6:51 pm    Post subject: Re: A question for the computer geeks... Reply with quote

UnLoser wrote:
So I was wondering how executable files can run on so many different computers. Don't different processors have different instruction sets? So how does one Windows .exe run on every computer that supports Windows? Is Windows only compatible with a certain series of processors? Or are .exe files actually some sort of intermediate code that needs to be compiled at runtime.

Not all exe files will run on all versions of Windows. The vast majority of Windows installations are on x86 type PCs. The processors have a standardized instruction set so as long as the exe is compiled to use that instruction set it will run. However if you try to run an x86 exe on an ARM version of Windows or vice-versa, it will not run. An exe compiled for 64 bit also won't run on a 32 bit machine. It will work the other way round because 64 bit versions of Windows have a 32 bit compatibility layer. To run these exe files the processor is switched into 32 bit mode and some clever intefacing code allows it to talk to the rest of the 64 bit operating system.

This 32/64 bit compatibility issue is why a large percentage of commercial applications are still 32 bit. Developers don't want to have to support two different versions so they pick the lowest common denominator.
_________________
I stopped fighting my inner demons. We're on the same side now.
Back to top
View user's profile Send private message Visit poster's website
ruveyn
Phoenix
Phoenix


Joined: Sep 22, 2008
Age: 76
Posts: 29336
Location: New Jersey

PostPosted: Tue Jan 01, 2013 8:44 pm    Post subject: Re: A question for the computer geeks... Reply with quote

UnLoser wrote:
(And I mean the word "geek" in the nicest way possible. Yes, I am a geek myself.)

So I was wondering how executable files can run on so many different computers. Don't different processors have different instruction sets? So how does one Windows .exe run on every computer that supports Windows? Is Windows only compatible with a certain series of processors? Or are .exe files actually some sort of intermediate code that needs to be compiled at runtime?

It would be nice if someone could explain this to me.


Those executables are most likely written in pseudo code which is translated into the actual instruction sets for the machines it runs on. Think of pseudo code is a low level language which deals with data at the register and bit livel.

ruvyen
Back to top
View user's profile Send private message
RazorEddie
Phoenix
Phoenix


Joined: Jan 19, 2012
Age: 42
Posts: 608

PostPosted: Tue Jan 01, 2013 9:01 pm    Post subject: Re: A question for the computer geeks... Reply with quote

[quote="ruveyn"]
UnLoser wrote:

Those executables are most likely written in pseudo code which is translated into the actual instruction sets for the machines it runs on. Think of pseudo code is a low level language which deals with data at the register and bit level.


Most pe format executable files (e.g. exe files, dlls and several other executable files) contain pure binary compiled code. The pe format has been extended to handle .NET and contains the intermediate language code but I don't think even that can be used across different processors.
_________________
I stopped fighting my inner demons. We're on the same side now.
Back to top
View user's profile Send private message Visit poster's website
zacb
Deinonychus
Deinonychus


Joined: May 08, 2012
Posts: 343

PostPosted: Tue Jan 01, 2013 11:49 pm    Post subject: Reply with quote

Usually, there are pieces of code you can embed in your program that "translates" your code across various systems. It is kind of like Java, which is able to be used on various systems, but it is not as elaborate.
_________________
Gary Johnson 2016(look him up)

Http://www.mildaspergers.com
Back to top
View user's profile Send private message
bcousins
Phoenix
Phoenix


Joined: May 02, 2011
Posts: 620
Location: On a failed Tangara set at Blacktown

PostPosted: Tue Jan 01, 2013 11:57 pm    Post subject: Reply with quote

Aquais94 wrote:

Do you Know, The new version of Windows (Windows 8 ) can run ARM Processor (for Windows RT only).


I'll bet it's x86
_________________
http://aspergersnetwork.com - Still in development
Back to top
View user's profile Send private message
stands2reason
Tufted Titmouse
Tufted Titmouse


Joined: Dec 28, 2012
Age: 22
Posts: 39

PostPosted: Wed Jan 02, 2013 9:21 am    Post subject: Reply with quote

bcousins wrote:
Aquais94 wrote:

Do you Know, The new version of Windows (Windows 8 ) can run ARM Processor (for Windows RT only).


I'll bet it's x86


How much will you bet? The ARM architecture is completely different. It's not even in the same family as x86; it's RISC and based on MIPS.
Back to top
View user's profile Send private message
Post new topic   Reply to topic    Wrong Planet Autism Forum Index -> Computers, Math, Science, and Technology   

 
Read more Articles on Wrong Planet



Wrong Planet is a Registered Trademark.
Copyright 2004-2013, Wrong Planet, LLC and Alex Plank. Alex does public speaking for Autism.

Advertise on Wrong Planet

Alex Hotchalk / Glam 

Alex Plank  Aspie Affection 

Terms of Service - You must read this as a user of Wrong Planet | Privacy Policy

Subscribe: RSS Feed  Wrong Planet News  Wrong Planet Forums




fine art