Path: utzoo!attcan!uunet!mailrus!sharkey!sbcs!bnlux0!kushmer From: kushmer@bnlux0.bnl.gov (christopher kushmerick) Newsgroups: comp.lang.c Subject: Wanted: code fragment to do two's complement sign extension Message-ID: <1792@bnlux0.bnl.gov> Date: 13 Apr 90 17:25:50 GMT Organization: Brookhaven National Lab Lines: 21 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@bnlux0.bnl.gov kushmerick@pofvax.sunysb.edu