Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What exactly is a
Message
De
01/12/2004 17:02:04
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
00964046
Message ID:
00966211
Vues:
7
IIRC, a "word" in the strictest sense is the size of a data entity that is directly addressible (i.e. minimal size of data entity that can be transferred between main memory and CPU register), while a "byte" represents a data element that corresponds to a single character of data. On Control Data mainframes a word is a 60-bit quantity consisting of ten 6-bit bytes (Geez, am I really *that* old?). On Intel 80x86 family of CPUs a "byte" is an 8-bit quantity, a "word" is a 16-bit quantity (two bytes), a "doubleword" is a 32-bit quantity (four bytes), and a "quadword" is a 64-bit quantity (eight bytes). Using typical Intel assembly-language nomenclature:
BYTE 8-bit
WORD 8-bit
DWORD 16-bit
QWORD 32-bit

If you think you can't get more confused, C declarations are affected by architecture. In 16-bit architectures, the "natural" size of data is a 16-bit entity, whereas in a 32-bit architecture the "natural" size of data is a 32-bit entity. Integers are typically the same size as the "natural" size. So, for 16-bit systems we have:
unsigned char = 8-bit quantity (i.e. byte)
int = 16-bit quantity
short = 16-bit quantity
long = 32-bit quantity

In a 32-bit system it changes a bit:
unsigned char = 8-bit quantity (i.e. byte)
int = 32-bit quantity
short = 16-bit quantity
long = 32-bit quantity
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform