HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Wirt Atmar <[log in to unmask]>
Reply To:
Date:
Wed, 20 Jun 2001 16:09:14 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (19 lines)
Greg writes:

> What I do not find on that page is the fairly simple method of inverting the
>  bits, so ASCII A, decimal 65, bin 01000001, becomes bin 10111110, decimal
>  190...

To mathematically create this simple form of bit complementation, use a
subtract operator, subtracting from 2^n - 1, where n is the number of bits
that your register of interest occupies. E.g., for 8 bits:

     255 - 65 = 190

Voila.

Wirt Atmar

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2