LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 04-16-2006, 05:36 AM   #1
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Rep: Reputation: 31
32 bit apps on 64 bit processor


Hello
I have a question ... that on a 64 bit processor ,
u have 2 install 64 bit os but CAN u run 32 bit applications
on a 64 bit processor ..... ALL OF THEM (in linux and improtantly windows [my family uses windows] only i use linux .... please dont talk abt migration])
and cant 32 bit OS get installed on them (if apps can? ) any thing i might consider before buying a 64 bit system .. i mean any unforseen consequences
 
Old 04-16-2006, 08:39 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
If you are planning on running 32-bit OS/applications, why pay for a 64-bit processor?

To answer your question, yes, all 32-bit applications work on a 64-bit x86_64 processor.
 
Old 04-16-2006, 12:58 PM   #3
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Original Poster
Rep: Reputation: 31
by 64 bit x 86_64 bit processor u mean all 64 bit or some (i mean i think x86 is if INTEL right????????)
also do u mean also 32 bit OS would work ??.... and what about my existing 32 bit linux distro ?? do the KERNEL thing and its all running?
 
Old 04-16-2006, 01:16 PM   #4
peter_89
Member
 
Registered: Jan 2006
Distribution: Microsoft Windows XP Professional SP2; Slackware Linux 10.2
Posts: 215

Rep: Reputation: 30
Quote:
Originally Posted by khaleel5000
by 64 bit x 86_64 bit processor u mean all 64 bit or some (i mean i think x86 is if INTEL right????????)
also do u mean also 32 bit OS would work ??.... and what about my existing 32 bit linux distro ?? do the KERNEL thing and its all running?
I'm not totally sure I understand what you are asking, but the important word here is code. 32-bit code is 32-bit code, it doesn't matter whether it comes in the form of an application or an operating system.
Now, realize that "x86" does not only mean Intel, even though the term is derived from one of their products. It just means x86 compatibile -- in other words, a processor that can run the same machine code that Intel's processors can. This is important to understand because AMD's processor line is x86 compatible, meaning it can run all the same stuff Intel's line can -- leaving no difference to a user like you.
Either way, all new 64-bit processors today are capable of running both types of code -- 32-bit and 64-bit -- so yes, your current 32-bit distribution would work, but with a 64-bit processor, so would a 64-bit distribution.
(By the way, I highly recommend you spend the extra fifty dollars on a 64-bit processor. Hardly any users use 64-bit operating systems now, but in four or five years when the market will be booming, you'll already be ahead of the curve when everybody else is debating on whether to upgrade or not.)
 
Old 04-16-2006, 02:49 PM   #5
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,248

Rep: Reputation: 46
Yes a 32 bit OS will run on a 64 bit processor.
 
Old 04-17-2006, 04:03 AM   #6
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Original Poster
Rep: Reputation: 31
okiez and what if i being a !@#$!@#^$# newbie a) use a 64 bit OS (can i install a 32 bit programme on it? ) ?
b) or a 64 bit programme on a 32 bit os?
 
Old 04-17-2006, 08:09 AM   #7
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
You can install a 32-bit application on a 64-bit OS, on a 64-bit x86_64 platform.

You cannot install a 64-bit application on a 32-bit OS.
 
Old 04-17-2006, 08:49 AM   #8
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Original Poster
Rep: Reputation: 31
ok now just if u can answer my another question posted in this form link is
http://www.linuxquestions.org/questi...55#post2203555


it would be exponentially appriciated
 
Old 04-17-2006, 03:06 PM   #9
Fireball7
Member
 
Registered: Nov 2005
Location: Lexington, Kentucky
Distribution: Slackware 10.2, Ubuntu 6.06
Posts: 46

Rep: Reputation: 15
Just one more response to your question: yes and no. A 'true' 64 bit cpu will not run a 32 bit program, os, etc. However most processors on the market today are hybrids (such as amd's athlon 64), which can run both. No worries, though, just have fun building your compy.
 
Old 04-17-2006, 04:54 PM   #10
peter_89
Member
 
Registered: Jan 2006
Distribution: Microsoft Windows XP Professional SP2; Slackware Linux 10.2
Posts: 215

Rep: Reputation: 30
Quote:
Originally Posted by Fireball7
Just one more response to your question: yes and no. A 'true' 64 bit cpu will not run a 32 bit program, os, etc. However most processors on the market today are hybrids (such as amd's athlon 64), which can run both. No worries, though, just have fun building your compy.
True. But don't worry about accidentaly buying a "true" 64-bit processors, since all of the 64-bit CPUs that you are even going to see WILL be hybrids.
"True" 64-bit CPUs these days are used for enterprise-grade servers.
 
Old 04-19-2006, 03:39 AM   #11
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Quote:
Originally Posted by macemoneta
You can install a 32-bit application on a 64-bit OS, on a 64-bit x86_64 platform.

You cannot install a 64-bit application on a 32-bit OS.
Not true. It depends on what we need from 64-bits (larger virtual memory space or just numbers). Try this:
Code:
#include <stdio.h>
#include <stdint.h>

int main(void)
{
        uint64_t x = ~ 0;       /* "unsigned long long" may be used too */
        uint32_t y = ~ 0;

        printf("sizeof(x) = %u, sizeof(y) = %u\n", sizeof(x), sizeof(y));
        printf("x = %llu\n", x);
        printf("y = %u\n", y);
        return 0;
}
 
Old 04-19-2006, 04:40 AM   #12
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
Quote:
Originally Posted by macemoneta
You can install a 32-bit application on a 64-bit OS, on a 64-bit x86_64 platform.
Yes... BUT note that 32-bit apps require the 32-bit versions of various libraries, while 64-bit apps require 64-bit versions of the same libraries; so there needs to be a way for them to coexist.
 
Old 04-19-2006, 08:55 AM   #13
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
primo: The issue isn't building from source. You can build from source for most any platform. The issue for most is running a 32-bit x86 binary on an x86_64 platform running an x84_64 distribution. In that case, for binaries built non-statically, the issue is the installed libraries as spooon pointed out.

spooon: The x86_64 distributions use lib64 directories in addition to lib directories, which allow the coexistence of both 32 and 64-bit versions of the same library (e.g., /usr/lib and /usr/lib64). As a result, 32-bit and 64-bit prebuilt binaries can coexist peacefully.

For example, I prefer to use the 32-bit Firefox on my x86_64, because it is compatible with 32-bit only plugins. So I remove the existing (64-bit) Firefox, add the i386 repositories to yum, and:

yum -y --enablerepo=*386 install firefox

32-bit (i386) requisite libraries are installed in /usr/lib, and there is no conflict.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit processor question bunnyknight13 Linux - Newbie 1 03-12-2006 08:13 AM
SUSE 9.3 on 64 bit processor trainee Suse/Novell 3 07-23-2005 11:27 AM
64 bit processor UGT001 Linux - Newbie 2 01-09-2005 09:26 PM
64 bit processor shanenin Linux - Software 1 08-01-2004 03:37 PM
New 64 bit processor, 1.8 Ghz? Fear58 General 14 03-23-2004 04:51 PM


All times are GMT -5. The time now is 06:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration