>N = N-2*N && this will do it but is there simply a function that will convert it.This assumes two's complement representation of integers and will fail on systems where you're dealing with one's complement representation. And if you think that sounds weird, in one's complement you can have positive and negative zero. Recall running into that once before on a Control Data mainframe when I had a Pascal program that called a routine written in FORTRAN and got weird results (code generated by the Pascal compiler assumed that zeroes were being normalized, whereas FORTRAN code tended to leave zero values non-normalized. Problem was easily fixed by calling an assembly-language routine that normalized values).