1. Member
Join Date
Jan 2009
Posts
1
Rep Power
0

## Need help on my project on JAVA BINARY ADDITION

hi,im arnel.im new to this forum..i need help on my project about BINARY ADDITION. my instructor ask us to make a program about BINARY ADDITION. it goes like this:

Enter Number of Value: 3
Enter number of Binary:3
Enter Binary digit:1
Enter Binary digit:0
Enter Binary digit:1
Enter number of Binary:2
Enter Binary digit:0
Enter Binary digit:1
Enter number of Binary:3
Enter Binary digit:1
Enter Binary digit:1
Enter Binary digit:1

101
01
111

and then it somes up the result of the binary..i only got so far on User entering how many values of binary he wants to ask,and how many digits he wants to add.

this is my program i got so far:

import java.util.Scanner;

public static void main(String[] args) {

Scanner numB= new Scanner(System.in);
Scanner numA= new Scanner(System.in);
Integer num1,num2,num3;

System.out.print("Enter number of value:");
num1= numA.nextInt();
for (int j = 0;j < num1;j++){
System.out.print("Enter digits for binary:");
num2 = numA.nextInt();

for (int b = 0;b < num2;b++){
System.out.print("Enter binary number:");
num3 = numA.nextInt();
}

}

}}

2. We don't write code for people. Please talk to your instructor...

3. Senior Member
Join Date
Sep 2008
Posts
564
Rep Power
9
if you can do it by hand, then chances are you can make an algorithm to do it. it may not be pretty at first, but it's the necessary steps to take.

if you can't do it by hand, then i suggest you learn that first.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•