What does 32 bit application mean?

"Jatin Bhateja, Noida" <jatinb@noida.hcltech.com>
28 Jul 2005 02:28:56 -0400

          From comp.compilers

Related articles
What does 32 bit application mean? jatinb@noida.hcltech.com (Jatin Bhateja, Noida) (2005-07-28)
Re: What does 32 bit application mean? Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2005-07-31)
Re: What does 32 bit application mean? DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-07-31)
Re: What does 32 bit application mean? fw@deneb.enyo.de (Florian Weimer) (2005-08-01)
Re: What does 32 bit application mean? marcov@stack.nl (Marco van de Voort) (2005-08-03)
Re: What does 32 bit application mean? marcov@stack.nl (Marco van de Voort) (2005-08-05)
Re: What does 32 bit application mean? freitag@alancoxonachip.com (Andi Kleen) (2005-08-05)
| List of all articles for this month |

From: "Jatin Bhateja, Noida" <jatinb@noida.hcltech.com>
Newsgroups: comp.compilers
Date: 28 Jul 2005 02:28:56 -0400
Organization: Compilers Central
Keywords: architecture, question
Posted-Date: 28 Jul 2005 02:28:56 EDT

Hi All

My question might sound trivial but I am not able to get an satisfying
answer yet. Question is what do one understand when we say that an
application is 32 bit or 64bit. Does this means that the compiler is
compiled for 32 bit machine. If so this means that the application
will use 32/64 bit registers. I have got two answers with me but I
don't know exactly which one is correct. Kindly clear my doubt :

Answer 1: When an application is compiled for and if the assembly
generated by the compiler uses 32 bit register then we say that an
application is 32 bit application. Thus it corresponds to the register
size of an architecture.

Answer 2: An application which contains 32 bit (virtual) addresses in
its assembly is called an 32 bit application.

Also is it possible to run a 32 bit application on 64 bit machine and
vice-versa. My personal view is that a 32 bit application and easily
run on 64 bit machine if my answer 1 holds good. But a 64 bit
application might not run on 32 bit architecture. But I think
logically if for example we want to load any 64 data to a 32 bit
machine the we can do it by loading upper 32 first and then lower 32
bit data of 64 bit data. Thus logically it seems possible though I am
not sure that it is feasible or not. If my logical understanding is
correct then can we make some tool such that if the compiler produces
64 bit code (contain 64 bit register) the tool will convert the 64 bit
instructions to 32 bit instructions. Thus this 32 bit code can then be
processed by assembler for 32 bit architecture.

Thanks and Best Regards
Jatin Bhateja
Contributing to the World by creating indispensable value

System Software CoE @ HCLT-Noida
Ph. : +91-120-2510701/702 Ext : 3126
FAX : +91-120-2510713

[On all the modern machines I know, the register size and the address
size are the same, so your two definitions are equivalent.

As to whether you can run 32 bit code on a 64 bit machine or v/v, any
compiled program requires a particular hardware instruction set. For
64 bit machines that evolved from 32 bit machines such as IBM zSeries
and AMD 64, there is usually a compatibility mode that emulates the 32
bit predecessor. In the other direction, forget it, 32 bit machines
don't run 64 bit code. You can indeed program a 32 bit machine (or
for that matter an 8 or 16 bit machine) to handle 64 bit data, but
that doesn't make it 64 bit code. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.