Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Manipulation of Binary Numbers
Date: Wed, 6 Feb 2008 00:06:44 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 32
Message-ID: <foatmk$nph$1@canopus.cc.umanitoba.ca>
References: <c50dec66-3a80-4d42-922b-ddcaf5eaf357@l1g2000hsa.googlegroups.com> <fo9fle$4an$1@fred.mathworks.com> <74d47d21-3f70-43a0-ab8d-b58d163ffae4@l32g2000hse.googlegroups.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1202256404 24369 192.70.172.160 (6 Feb 2008 00:06:44 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Wed, 6 Feb 2008 00:06:44 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:449488


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'.