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: Manipulation of Binary Numbers
Date: Mon, 4 Feb 2008 17:31:08 -0800 (PST)
Organization: http://groups.google.com
Lines: 18
Message-ID: <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 1202175068 496 127.0.0.1 (5 Feb 2008 01:31:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 5 Feb 2008 01:31:08 +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:449285


Hi

I am working with a file that contains a serial data stream (i.e
binary data)
i an then storing this data into arrays. i.e the number 3 would look
like [ 0 0 1 1] etc

what i want is a way of adding these numbers together. i.e [0 0 1 1] +
[0 0 0 1] = [0 1 0 0]

at present, my idea is to write a short script that converts to
decimal, then add the other number, then convert back to an array
using dec2binvec and binvec2dec. a short function would do this, but i
would like an easier way to do this.

Any ideas?
Cheers,
Ben