What Does It Mean to Have a 16-Bit or 32-Bit Machine?

  • Thread starter Thread starter swty todd
  • Start date Start date
  • Tags Tags
    Machine Mean
Click For Summary
SUMMARY

The discussion centers on the implications of 16-bit versus 32-bit and 64-bit machines in relation to C programming. Key points include that the largest unsigned integer for a 16-bit machine is 65,535, while for a 32-bit machine it is 4,294,967,296. Most modern systems operate on 64-bit architecture, but many still use 32-bit as the default. Users can determine their operating system's bit version by checking system properties, with Windows XP and Vista providing specific indicators for 32-bit or 64-bit installations.

PREREQUISITES
  • Understanding of C programming and data types
  • Familiarity with operating system architecture (32-bit vs. 64-bit)
  • Knowledge of microprocessor instruction sets (e.g., AMD64, IA64)
  • Experience with Visual Studio and its compiler options
NEXT STEPS
  • Research the differences between AMD64 and IA64 instruction sets
  • Learn how to compile C code for different architectures using Visual Studio
  • Explore the history and evolution of operating systems from 16-bit to 64-bit
  • Investigate the compatibility of software across different bit architectures
USEFUL FOR

Software developers, system architects, and IT professionals interested in understanding the impact of machine architecture on programming and software compatibility.

swty todd
Messages
69
Reaction score
0
our textbook says that the output of a C program deepends on whether the machine is 32 bit or 16 bit. So i was wondering what that means and if today 16 bit machines are still used?
 
Technology news on Phys.org
The default size of int used will depend based on the machine. Largest unsigned integer that can be stored in 16 bit is 65,535, and 32 bit is 4,294,967,296. This is why it's advised you explicitly declare the size of integers. Most modern machines are actually 64 bit now, but I don't think anything would default to 64 bit, someone should confirm this though.
 
swty todd said:
our textbook says that the output of a C program deepends on whether the machine is 32 bit or 16 bit. So i was wondering what that means and if today 16 bit machines are still used?

LOL, some uCs are still 8-bit -- we sell them in the bzillions. Each machine and its C implementation will have different limits and sizes for various standard variables and structures. You can design your C code to accommodate that, though, if you run on multiple platforms. Not sure how hard it is to bridge 64-bit and old 8-bit platforms, though.
 
i have an XP and a VISTA .So how do I know whether they are 64 or 32 bits??
 
but how can i find out how many bits my operating system works on?
 
swty todd said:
but how can i find out how many bits my operating system works on?
Unless you have some type of extender, it depends on the version of the OS. XP X64 and Vista 64 bit are 64 bit OS'es, based on the AMD64 (AMD) == EMT64 (Intel) instruction set. You need a CPU that supports the EMT64 instruction set, and a 64 bit version of XP or Vista. In the case of XP, the default desktop shows it's the 64 bit version. If you still have your software box, it should clearly state if it's the 64 bit version, if not, it's 32 bit only. I'm not aware of 64 bit extenders that run under 32 bit OSes.

Trivia #1: Intel also has Itanium cpu's that use the IA64 instruction set which is different and you need one of the Windows Servers or older Windows NT versions meant for the Itanium CPU's that implement the IA64 instruction set. Desktop systems don't use the Itanium CPUs (I'm not aware of Windows XP or Vista versions that run on Itaniums).

Trivia#2: Back in the "olden" days, there were 32 bit extenders for both 16 bit DOS and 16 bit Windows 3.1. For DOS, some created a Windows NT like environment, called TNT extenders, I'm not sure about DOS4GW. Windows 3.1 included a 32 bit winmem32 memory model, but the Watcom c/c++ compiler (10.0) was one the few compilers that implemented winmem32 as a standard memory model. The primary extender for Windows 3.1 was win32s, sort of a precursor to Windows 95, but required win32s be installed, while winmen32 was a native part of Windows 3.1.
 
Last edited:
It depends on the compiler, but an old C/C++ compiler will probably give you the option to compile your code as 16 or 32 bit. 16 bit Microsoft operating systems went out with DOS and windows 3.11. Very few people have the 64 bit version of Windows XP, but the 64 bit version of vista is very popular, and if you have it, then you can use a 64 bit compiler. Since 32 bit is still the defacto standard, if you do have a 64 bit OS, and a 64 bit compiler, then you can explicitly compile your code as 64 bit.

To give an example, the last few versions of visual studio ship with a 64 bit compiler, but it is not installed by default (also, I believe you can compile 64 bit code with it on a 32 bit machine, but, of course, cannot run it).

A lot of UNIX/Linux distributions ship in a 64 bit flavor.
 
i right clicked on my computer and then properties and it said 1.46 GHz,0.99 GB RAM.

so how do i know it in bits?
 
  • #10
If it is Vista, it will say either 32 or 64 bit operating system next to System Type:

If it is XP, it is 32 bits, unless you got a 64 bit XP disk and installed it yourself.
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
3K
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
Replies
1
Views
3K
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
2K
Replies
29
Views
5K