Apologies again, > mask := SYSTEM.VAL(SET, ASR(7FFFFFFFH, -(x) )); > mask := ASR(-{31}, -(x+1)) Above seems same thing, for x := 0..31, I just could not resist testing it. Will try to understand the code further. Many thanks. -- Tomas Kral <thomas.kral at email.cz>