what's WORD and DWORD?

This is a discussion on what's WORD and DWORD? within the C++ Programming forums, part of the General Programming Boards category; Can anyone help out? What values do they hold?...

  1. #1

    Unhappy what's WORD and DWORD?

    Can anyone help out?
    What values do they hold?

  2. #2
    Join Date
    Aug 2001
    Well the way microsoft and intel use them is
    word 16 bits
    dword 32 bits

  3. #3
    can someone give an example for each (some declaration perhaps)?

    so far, WORD is 16 bit and DWORD (I'm assuming "double word") is 32 bit.

    are they used to hold chars or something?

  4. #4
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    that, or ebonics... word... word... [abbreviated as dword... for convienience...]
    hasafraggin shizigishin oppashigger...

  5. #5
    Registered User
    Join Date
    Oct 2001
    They hold numbers. For example:

    #include <iostream.h>
    #include <conio.h>
    #include <stdio.h>
    #include <windows.h>
    int main(void)
    DWORD start, end;

    cout << "Hello." << endl;
    start = GetTickCount();
    end = GetTickCount();
    printf("start:%lu end:%lu\n",start,end);
    printf("millisec elapsed: %lu\n",end-start);
    cout << "Good bye." << endl;
    cout << "Press <enter> to continue ...";
    return 0;

  6. #6
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Their basis is the word size of the processor (the width of it's registers). So a 16bit processor would have a word size of 16, a 32bit -32 etc. However the meaning has been altered slightly so that a WORD is always 16bit and a DWORD(double word) is 32bit, and I assume 64bit will be QWORD. A WORD is an unsigned 16bit integer and a DWORD is an unsigned 32bit integer, so they can hold variables of these types (or types that can be converted to one of them).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 06:49 PM
  2. Dword / Word
    By l2u in forum C++ Programming
    Replies: 7
    Last Post: 06-14-2006, 08:08 AM
  3. Reading a bitmap image
    By usamaalam in forum C Programming
    Replies: 19
    Last Post: 03-06-2004, 06:13 AM
  4. storage size of regs is unkown
    By Vertex34 in forum C Programming
    Replies: 5
    Last Post: 11-04-2003, 10:17 AM
  5. which is faster? DWORD or WORD?
    By mickey in forum Windows Programming
    Replies: 4
    Last Post: 07-20-2002, 01:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21