title: BYTE, WORD and DWORD macros definition
body: <p>I am trying to understand, what would be the best way to define <code>BYTE</code>, <code>WORD</code> and <code>DWORD</code> macros, which are mentioned in answers of this <a href="http://forums.codeguru.com/showthread.php?302806-what-is-HIBYTE-LOBYTE-HIWORD-LOWORD" rel="noreferrer">question</a>.</p>
  
  <blockquote>
  <pre><code>#define LOWORD(l) ((WORD)(l))
  #define HIWORD(l) ((WORD)(((DWORD)(l) &gt;&gt; 16) &amp; 0xFFFF))
  #define LOBYTE(w) ((BYTE)(w))
  #define HIBYTE(w) ((BYTE)(((WORD)(w) &gt;&gt; 8) &amp; 0xFF))
  </code></pre>
  </blockquote>
  
  <p>Would it be correct to assume, that:</p>
  
  <ul>
  <li><code>BYTE</code> is macro defined as
  <code>#define BYTE __uint8_t</code></li>
  <li><code>WORD</code> is macro defined as
  <code>#define WORD __uint16_t</code></li>
  <li><code>DWORD</code> is macro defined as
  <code>#define DWORD __uint32_t</code></li>
  </ul>
  
  <p>If yes, why cast to another macro instead of casting to <code>__uint8_t</code>, <code>__uint16_t</code> or <code>__uint32_t</code>? Is it written like that to increase clarity?</p>
  
  <p>I also found another <a href="https://stackoverflow.com/questions/38283855/format-specifiers-for-data-type-byte-word-and-dword-in-c-language">question</a> which answers include <code>typedef</code>, with little bit more of <em>research</em> I've found answers to <a href="https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c#1666375">question about comparing <code>#define</code> and <code>typedef</code></a>. Would <code>typedef</code> be better to use in this case?</p>