Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!acc!jal From: jal@acc (John Lauro) Newsgroups: comp.lang.c Subject: Re: How to reverse bits... Message-ID: <1990Aug14.233308.27889@caen.engin.umich.edu> Date: 14 Aug 90 23:33:08 GMT References: <2059@ux.acs.umn.edu> <1990Aug14.203212.16248@motcad.portal.com> Sender: news@caen.engin.umich.edu (CAEN Netnews) Organization: University of Michigan - Flint Lines: 9 In article <1990Aug14.203212.16248@motcad.portal.com> jtc@motcad.portal.com (J.T. Conklin) writes: >Another useful table is one that flips the bits 1-for-0,0-for-1. This >is useful for inverting an image. How about: (assuming 8 bit char c) c=255-c; or c^=255; - John_Lauro@ub.cc.umich.edu