I think that unnecessary is more appropos. The dword you are creating is actually a packed structure, not a value. Bitfields are really structures. There is an alpha channel, red, green and blue. There are two methods of extracting the individual fields. One is by math, the other is mask and shift. You are not using masking, but it is not necessary. Shifting will work by itself, but masking and shifting is more efficient and faster, I think.
To strip a byte out of a dword, you mask the byte's position with ones, and the rest are zeroes. I use hex for the mask because it looks more logical to me than using decimal. You use the and operator, and then you shift the result into a byte, like this:
To get the MSB out of a dword, mask it with 0xff000000 and shift right 24 times.
i.e, byteval1 = (dwval && 0xff000000) >> 24 rem takes the MSB only.
byteval2 = (dwval && 0x00ff0000) >> 16 rem takes the next 8
byteval3 = (dwval && 0x0000ff00) >> 8
byteval4 = dwval && 0x000000ff
That would get the bytes out correctly from a dword. It does not affect the variable at all, it simply takes what it want from it.
Now, if the red is packed to the left (msb, lower case means bit, as opposed to BYTE.) and is contained in 5 bits, it is only necessary to shift it right 3 positions. This is not really division, it is a bitfield, and it is packed, which means the position it occupies is not its value, merely its position. It remained very fuzzy to me for a very long time!
Look at this from Quake III, sometimes programmers are too cute! I guess John Carmack is no exception:
#define IDBSPHEADER (('P'<<24)+('S'<<16)+('B'<<8)+'I')
// little-endian "IBSP"
IDBSPHEADER is now a dword, but it is really 'IBSP'. The code to check it only tests a dword against IDBSPHEADER...its not a string compare!