'=========================================================================== ' Subject: COMBINE LOW & HIGH BITS Date: 05-18-97 (22:31) ' Author: Kurt Kuzba Code: QB, QBasic, PDS ' Origin: FidoNet QUIK_BAS Echo Packet: FAQS.ABC '=========================================================================== '> If I have a certain number in hex (say, &H10FF), I can '> get the high bit (&H10) by dividing by 256, and the low '> bit(&HFF) by doing &H10FF MOD 256, but here is the problem. '> If I have a high bit (lets take &H10 again), and a low '> bit (&HFF again), how do I combine them into one hex '> number? (back to &H10FF) '>.... ' Try something like this once. CLS th$ = "&H1234" t& = VAL(th$) t1% = INT(t& \ &H100) t2% = INT(t& AND &HFF) PRINT th$; t&; t1%; t2% t& = t1% t& = t& * &H100 t& = t& + t2% PRINT "&H"; HEX$(t&)