Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!l1g2000hsa.googlegroups.com!not-for-mail
From: bennymacca <ben.c.mcdonald@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Manipulation of Binary Numbers
Date: Tue, 5 Feb 2008 16:29:49 -0800 (PST)
Organization: http://groups.google.com
Lines: 44
Message-ID: <3e6eb0e4-31ba-410d-b3ec-632db2027ffc@l1g2000hsa.googlegroups.com>
References: <c50dec66-3a80-4d42-922b-ddcaf5eaf357@l1g2000hsa.googlegroups.com> 
NNTP-Posting-Host: 203.5.217.3
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1202257790 10141 127.0.0.1 (6 Feb 2008 00:29:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 6 Feb 2008 00:29:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: l1g2000hsa.googlegroups.com; posting-host=203.5.217.3; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
X-HTTP-Via: 1.0 ednwc503 (NetCache NetApp/6.0.2), 1.1 DIGger2 (NetCache 
Xref: news.mathworks.com comp.soft-sys.matlab:449493


thanks walter,
your right

what i wanted to distinguish though is that i was working on ones and
zeros, not on say an 8-bit integer grouped from the  binary data
stream, in which case it would make more sense to convert the number
first before performing operations.

Regards,
ben

Walter Roberson wrote:
> In article <74d47d21-3f70-43a0-ab8d-b58d163ffae4@l32g2000hse.googlegroups.com>,
> bennymacca  <ben.c.mcdonald@gmail.com> wrote:
>
> >When i meant binary data stream, i meant the bits themselves. what i
> >do with them is not the issue, and is irrelevant here.
>
> >all i wanted to know was the best way to perform operations on single
> >bits at a time. i already know what the bits mean, but this does not
> >change the arithmetic performed on then.
>
> Your posted question was about the best way to group several bits
> in order to perform operations on the group, which is a different
> question than performing operations on single bits.
>
>
> >if the binary stream was meant to be interpreted as integers or other,
> >then i would have converted to that, and there would not have been a
> >problem. but matlab seems to have little support for a "binary data
> >type" which is what i would like.
>
> Matlab Fixed-Point Toolbox
> http://www.mathworks.com/products/fixed/description3.html
>
>   The toolbox lets you use four modes for performing fixed-point arithmetic:
>
>     Fully automatic mode, enabling you to use up to 65,535 bits for the
>     sum or product
>
>     Fully specified mode, letting you indicate the word length and binary
>     point location for the sum or product
> --
> 'Roberson' is my family name; my given name is 'Walter'.