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

In summary, the output of a C program depends on whether the machine is 32 bit or 16 bit, and it is advised to explicitly declare the size of integers to accommodate different platforms. Most modern machines are 64 bit, but older and less powerful machines may still use 8 or 16 bit processors. To determine the number of bits your operating system works on, you can check the version of your OS or use a 64 bit compiler.
  • #1
swty todd
70
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
  • #2
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.
 
  • #3
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.
 
  • #4
i have an XP and a VISTA .So how do I know whether they are 64 or 32 bits??
 
  • #6
but how can i find out how many bits my operating system works on?
 
  • #7
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:
  • #8
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.
 
  • #9
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.
 

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

1. What does it mean to have a 16-bit or 32-bit machine?

A 16-bit or 32-bit machine refers to the number of bits that the central processing unit (CPU) of a computer can process at one time. This determines the maximum amount of memory and data that the computer can handle.

2. How does having a 16-bit or 32-bit machine affect computer performance?

A 32-bit machine is able to process larger chunks of data and access more memory at once compared to a 16-bit machine. This can result in faster performance and the ability to run more complex programs.

3. Can a 32-bit machine run 16-bit software?

Yes, a 32-bit machine is able to run both 32-bit and 16-bit software. However, a 16-bit machine is not able to run 32-bit software.

4. What are the advantages of a 64-bit machine over a 32-bit machine?

A 64-bit machine can process even larger chunks of data and access more memory compared to a 32-bit machine. This allows for even faster performance and the ability to run more complex programs, especially those designed for 64-bit systems.

5. Can a 32-bit operating system run on a 64-bit machine?

Yes, a 64-bit machine is able to run both 32-bit and 64-bit operating systems. However, a 32-bit machine is not able to run 64-bit operating systems.

Similar threads

  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
7
Views
3K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
1
Views
902
  • Programming and Computer Science
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
29
Views
3K
Back
Top