Questions tagged [32-bit]

In computer architecture, 32-bit integers, memory addresses, or other data units are those that are at most 32 bits (4 octets) wide. Also, 32-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size. 32-bit is also a term given to a generation of computers in which 32-bit processors are the norm.

The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295. Hence, a processor with 32-bit memory addresses can directly access 4 GiB of byte-addressable memory.

The external address and data buses are often wider than 32 bits but both of these are stored and manipulated internally in the processor as 32-bit quantities. For example, the Pentium Pro processor is a 32-bit machine, but the external address bus is 36 bits wide, and the external data bus is 64 bits wide.

Source: Wikipedia (32-bit)

1381 questions
605
votes
13 answers

How can I tell if I'm running in 64-bit JVM or 32-bit JVM (from within a program)?

How can I tell if the JVM in which my application runs is 32 bit or 64-bit? Specifically, what functions or properties I can used to detect this within the program?
BobMcGee
  • 19,824
  • 10
  • 45
  • 57
541
votes
26 answers

"An attempt was made to load a program with an incorrect format" even when the platforms are the same

I'm calling functions from a 32-bit unmanaged DLL on a 64-bit system. What I get is: BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) At first, I had my projects set to…
David Brown
  • 35,411
  • 11
  • 83
  • 132
133
votes
7 answers

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake

Is it possible to compile a project in 32-bit with cmake and gcc on a 64-bit system? It probably is, but how do I do it? When I tried it the "ignorant" way, without setting any parameters/flags/etc, just setting LD_LIBRARY_PATH to find the linked…
dala
  • 1,975
  • 3
  • 14
  • 15
112
votes
11 answers

Converting a pointer into an integer

I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itself. A short example: void function(MESSAGE_ID id,…
PierreBdR
  • 42,120
  • 10
  • 46
  • 62
98
votes
9 answers

Java 32-bit vs 64-bit compatibility

Will Java code built and compiled against a 32-bit JDK into 32-bit byte code work in a 64-bit JVM? Or does a 64-bit JVM require 64-bit byte code? To give a little more detail, I have code that was working in a Solaris environment running a 32-bit…
mshafrir
  • 5,190
  • 12
  • 43
  • 56
93
votes
5 answers

Determine if current PowerShell Process is 32-bit or 64-bit?

When running a PowerShell script on a x64-bit OS platform, how can you determine in the script what version of PowerShell (32-bit or 64-bit) the script is running on? Background Both 32-bit and 64-bit versions of PowerShell are installed by…
Tangiest
  • 43,737
  • 24
  • 82
  • 113
90
votes
9 answers

Are 64 bit programs bigger and faster than 32 bit versions?

I suppose I am focussing on x86, but I am generally interested in the move from 32 to 64 bit. Logically, I can see that constants and pointers, in some cases, will be larger so programs are likely to be larger. And the desire to allocate memory on…
philcolbourn
  • 4,042
  • 3
  • 28
  • 33
81
votes
3 answers

Why is Windows 32-bit called Windows x86 and not Windows x32?

The Windows operating system can be either 32 bit or 64 bit. The 64 bit version is called Windows x64 but the 32 bit version is called Windows x86. Why isn't it called Windows x32? What is the reason?
Bacteria
  • 8,406
  • 10
  • 50
  • 67
76
votes
3 answers

What is better "int 0x80" or "syscall" in 32-bit code on Linux?

I study the Linux kernel and found out that for x86_64 architecture the interrupt int 0x80 doesn't work for calling system calls1. For the i386 architecture (32-bit x86 user-space), what is more preferable: syscall or int 0x80 and why? I use Linux…
Alex
  • 9,891
  • 11
  • 53
  • 87
75
votes
5 answers

How do I tell if my application is running as a 32-bit or 64-bit application?

How do I tell if my application (compiled in Visual Studio 2008 as Any CPU) is running as a 32-bit or 64-bit application?
Redwood
  • 66,744
  • 41
  • 126
  • 187
74
votes
3 answers

Force gcc to compile 32 bit programs on 64 bit platform

I've got a proprietary program that I'm trying to use on a 64 bit system. When I launch the setup it works ok, but after it tries to update itself and compile some modules and it fails to load them. I'm suspecting it's because it's using gcc and…
Jure1873
  • 879
  • 1
  • 7
  • 8
67
votes
6 answers

Why is -(-2147483648) = - 2147483648 in a 32-bit machine?

I think the question is self explanatory, I guess it probably has something to do with overflow but still I do not quite get it. What is happening, bitwise, under the hood? Why does -(-2147483648) = -2147483648 (at least while compiling in C)?
Lesscomfortable
  • 823
  • 1
  • 6
  • 13
65
votes
3 answers

How to Compile 32-bit Apps on 64-bit Ubuntu?

I'm trying to compile a 32-bit C application on Ubuntu Server 12.04 LTS 64-bit using gcc 4.8. I'm getting linker error messages about incompatible libraries and skipping -lgcc. What do I need to do to get 32 bit apps compiled and linked?
BSalita
  • 8,420
  • 10
  • 51
  • 68
59
votes
7 answers

How do I run a VBScript in 32-bit mode on a 64-bit machine?

I have a text file that ends with .vbs that I have written the following in: Set Conn = CreateObject("ADODB.Connection") Conn.Provider = "Microsoft.ACE.OLEDB.12.0" Conn.Properties("Data Source") = "C:\dummy.accdb" Conn.Properties("Jet OLEDB:Database…
Peter
  • 1,543
  • 3
  • 13
  • 9
57
votes
10 answers

What is the difference between a 32-bit and 64-bit processor?

I have been trying to read up on 32-bit and 64-bit processors (http://en.wikipedia.org/wiki/32-bit_processing). My understanding is that a 32-bit processor (like x86) has registers 32-bits wide. I'm not sure what that means. So it has special…
user485498
1
2 3
92 93