Wanted: code fragment to do two's complement sign extension

christopher kushmerick kushmer at bnlux0.bnl.gov
Sat Apr 14 03:25:50 AEST 1990


I have a data file from an Aspect 3000 computer based NMR machine. The file
consists mostly of integers, and it is only the integers I am interested in.

The aspect 3000 uses three-byte words exclusively. I want to convert the
three-word signed two's complement integers to vax four-byte integers. I 
am using vax c under vms.

Well, my c is rusty, and I never was too handy with those bit wise operators,
so I am having trouble with this seemingly trivia task. So if some kind
sole could run me through it I would be grateful.

Email please, if possible.
Thank you,



-- 
Chris Kushmerick

kushmer at bnlux0.bnl.gov
kushmerick at pofvax.sunysb.edu



More information about the Comp.lang.c mailing list