Re: [OT] Byte-wise boolean optimisation
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 29 May 2007 15:33:06 -0400
Walter Banks wrote: *** and top-posted - fixed ***
Thomas Pircher wrote:
I'm wondering if there exist algorithms for byte-wise boolean
optimisation, much like the Quine-McCluskey works for a single bit.
Basically I have 8 truth-functions f7(.) ... f0(.) representing
the bits 7..0 of the result byte, and I would like to find an
optimised function f(.) which gives the same result as the single-
bit-functions together and uses 8-bit parallel boolean operators.
Obviously I can write
f(.) = f7(.) << 7 | f6(.) << 6 | ... | f0(.)
but this is not very elegant. Is this a common problem that
someone has solved in a better way than my straight-forward
(naive) attempt?
We have looked at this in the context of compiler processing of
booleans. Parallel and's and ors are quite easy. Generic boolean
expressions are a lot more difficult to accomplish and there
is no general solution that I know of. We do check in our
compilers if boolean bits are in the same byte (or processor
native word size) and generate code that take advantage of
this for simple and and or operations.
This is a highly interesting subject to me, so please avoid
top-posting. Your answer belongs after (or intermixed with) the
quoted material to which you reply, after snipping all irrelevant
material. See the following links:
--
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/> (taming google)
<http://members.fortunecity.com/nnqweb/> (newusers)
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: [OT] Byte-wise boolean optimisation
- From: Steve at fivetrees
- Re: [OT] Byte-wise boolean optimisation
- References:
- [OT] Byte-wise boolean optimisation
- From: Thomas Pircher
- Re: [OT] Byte-wise boolean optimisation
- From: Walter Banks
- [OT] Byte-wise boolean optimisation
- Prev by Date: Re: wd-g-zx4120 gps module
- Next by Date: Re: Trust 1-man headhunter operation?
- Previous by thread: Re: [OT] Byte-wise boolean optimisation
- Next by thread: Re: [OT] Byte-wise boolean optimisation
- Index(es):
Relevant Pages
|