C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 28th, 2002, 06:19 PM
Optix Optix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 36 Optix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Dword?

Hi Im sorta a C++ Newbie as you might know, but i was wondering what DWORD did. In most code I see there is DWORD watever; can someone please explain to me what this does? Thanks!

Reply With Quote
  #2  
Old September 28th, 2002, 06:49 PM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 13
I believe DWORD stands for 'double word.' A word is a two byte variable, so a double word is a four byte variable. What you have is a 32 bit unsigned integer.

Reply With Quote
  #3  
Old September 30th, 2002, 08:41 PM
Optix Optix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 36 Optix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11

Reply With Quote
  #4  
Old October 1st, 2002, 06:09 PM
MJEggertson MJEggertson is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Seattle WA
Posts: 863 MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level)MJEggertson User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 22 sec
Reputation Power: 13
Well it's a data type. No different from an integer (int) or a character (char).

1 byte = 8 bit.
1 word = 2 byte = 16 bit.
1 dword = 2 word = 4 byte = 32 bit.

A bit is a single digitial unit, usually noted as 0 or 1. So, a DWORD is 32 of these bits, with a range starting from

0000 0000 0000 0000 0000 0000 0000 0000

and going to

1111 1111 1111 1111 1111 1111 1111 1111

which in decimal is the range 0 to 4 294 967 295 (2^32). Imagine a DWORD as a simple unsigned integer (only whole numbers, where there is no information if the number is greater than or less than zero). In this case, it would have the ability to hold numbers between 0 and ~4.3 billion. There are other uses for DWORDS, how you use them is up to your program.

Reply With Quote
  #5  
Old October 2nd, 2002, 12:52 AM
Optix Optix is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 36 Optix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
ok i get it now ty

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Dword?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap