473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to do binary bit addition operation

rsk
Hi friends,

There are two integer arrays oper1[7] and oper2[7]
i have to do the addition of these two arrays and store the result in
sum[8] .

Please solve this prob.

Thanks in advance.
SS...

--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.c/
More information at http://www.talkaboutprogramming.com/faq.html

Oct 1 '07 #1
3 5904
"rsk" wrote:
There are two integer arrays oper1[7] and oper2[7]
i have to do the addition of these two arrays and store the result in
sum[8] .
Take a look at the link.

http://en.wikipedia.org/wiki/Binary_arithmetic
Oct 1 '07 #2
rsk:
Hi friends,

There are two integer arrays oper1[7] and oper2[7]
i have to do the addition of these two arrays and store the result in
sum[8] .

Please solve this prob.

Thanks in advance.
SS...

int[5] Func(int[5] *pa,int[5] *pb)
{
int[5] c;

unsigned i;

for(i = 0; while(i <= 5); continue ++i) c[i] = *pa[i] & *pb[i];

push_stack(c);

pop();

return;
}

Martin

Oct 1 '07 #3
Groovy hepcat Martin Wells was jivin' in comp.lang.c on Tue, 2 Oct 2007
3:17 am. It's a cool scene! Dig it.
rsk:
>There are two integer arrays oper1[7] and oper2[7]
i have to do the addition of these two arrays and store the result in
sum[8] .

Please solve this prob.
(To the OP.) No. We'll help you solve the "prob" yourself, if you put
in some effort. But we will not solve it for you. Post your best
effort, explain the problem and ask specific questions, and you may get
the help you need.
int[5] Func(int[5] *pa,int[5] *pb)
{
int[5] c;

unsigned i;

for(i = 0; while(i <= 5); continue ++i) c[i] = *pa[i] & *pb[i];

push_stack(c);

pop();

return;
}

Martin
Oh so helpful! Martin, I don't know what the hell that's meant to be,
but it's not C.

--
Dig the sig!

----------- Peter 'Shaggy' Haywood ------------
Ain't I'm a dawg!!

Oct 5 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nick | last post by:
I am working on a VB.NET application that uses remoting hosted inside on IIS. I chose the binary formatter for this application because the only clients that will be connecting to it are .NET...
4
by: Leslaw Bieniasz | last post by:
Cracow, 20.09.2004 Hello, I need to implement a library containing a hierarchy of classes together with some binary operations on objects. To fix attention, let me assume that it is a...
24
by: Alex Vinokur | last post by:
Consider the following statement: n+i, where i = 1 or 0. Is there more fast method for computing n+i than direct computing that sum? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT...
4
by: Tarique Jawed | last post by:
Alright I needed some help regarding a removal of a binary search tree. Yes its for a class, and yes I have tried working on it on my own, so no patronizing please. I have most of the code working,...
0
by: Bonj | last post by:
hello this is a purely algorithmical question but if i have posted to an irrelevant group, apologies. can anyone point me at some good tutorials or info about the steps involved in creating a...
10
by: Dan | last post by:
To all the gurus out there. I am writing a tool that receives binary data from a network device. The data arrives in a standard format which the vendor has documented, e.g. byte 0 is the format...
0
by: manimau | last post by:
Is there any chance of slightest light at the end of the tunnel in pursuing the cin and binary mode operation together? I am trying to see if I can open the cin in binary mode for read operation....
5
by: ggeshev | last post by:
Hello! I've got a method : public static Object _Add(Object val1, Object val2); {} val1 and val2 are among of these types : - sbyte - byte - short - ushort
1
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.