Hi Erel,
IN Electronics, it is very difficult to think in decimal values.. we either think in binary or in hex.. in fact hex is only a representation of a binary value in a short form. So if I want to close relays 1 to 4, open relay 5 and 6 and close relays 7 and 8, I can immediately define the binary value that's 0x30 (00110000) but it is very difficult to use decimal (or integer) if it's possible at all, it needs a lot of imagination. In VB we use something like MSComm1.Output = &h30.. I can immediately see the binary equivalent, and know which relays will be open and which will be closed.