Hi all, Plugging away at my LED project. I'm currently trying to combine 3 separate 8 bit values into one 24 bit value (stored in a 32 bit variable), and I've come across some weirdness. As part of my function, I've broken things down farther than I usually would to help isolate the problem. I now have this code: greentemp =3D green * 0x10000; redtemp =3D red * 0x100; bluetemp =3D blue; The temp variables are all uint32_t, and the input values are all uint8_t. The goal is to shift the values over so I can then add them together. When I execute this code with all of the input values as 0xFF, things are weird. Green (*0x10000) and Blue (*1) work fine, I end up with 0xFF0000 and 0xFF, respectively. However, redtemp ends up with 0xFFFFFF00, which I can't explain. Changing the red multiplier to 0x10000 (just as a test) works. Changing it to 0x1 works as well. But...0x100 doesn't. I know I'm probably missing something simple here, but I can't seem to figure it out. Help! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .