hello guys,
can any one tell me what is this 16bit code and 32 bit code. how does it relate to programming in c. i cant really understand
thanks very much
hello guys,
can any one tell me what is this 16bit code and 32 bit code. how does it relate to programming in c. i cant really understand
thanks very much
The bits are the width of the register. The more bits a register is wide the more data can be used on them at one time. Data is represented on different ways but i dont think it should really affect the way you are programming in c. Unless you are using in line assembler or something like that. The compiler takes of care of assembling for 16, 32 or 64 bit compiling.
Windows 3.11 is an eg of a 16 bit Operating system
windows 2000 is an eg of a 32 bit operating system
hope this helps
Monday - what a way to spend a seventh of your life
The 16 or 32 basically relates to the native word size of your compiler/operating system. It also relates to how the operating system handles the segmented memory architecture of Intel x86 processors.
16 bit code was typical for DOS programming. Here your segments are addressed using 16-bit numbers (hence the occasional comment, how do I allocate more than 64K).
32 bit code is typical for console and GUI programming (in windows). Segments here are 32-bit, which is a 4GB range (more than enough right?)
C itself doesn't care, because it runs on many more processors than just Intel, most of which do not use memory segments.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.