How to code 5 Digit Binary Adder?

I have this project I have to do and I was wondering how do I go about programming an adder like this?

It will be using LEDs and it needs to show user input and then add the two values in binary?

Any pointers?
I am completely new with arduino and that stuff, as for wiring i have an idea and how to communicate the software to the correct pins. (in other words i know how to program an LED to turn off/on) etc but would it just be some boolean values for on and off? I don't know please help. (I do program in c++ and i hear that it is similar to the arduino language)

Have you looked at the digital examples that ship with the IDE?

I have not.. however i have looked at how to turn on LEDs etc etc but I dont know the actual adding process

MenoHD:
I have not.. however i have looked at how to turn on LEDs etc etc but I dont know the actual adding process

It's the "+" operator. :slight_smile: Arithmetic in a computer is binary.

MenoHD:
I have not..

Then do.

So like it would be something along the lines of...

int buttonA = 5; // change value if you used a different digital I/O pin
int buttonB = 7;

void setup(){
 pinMode(buttonA, INPUT);   //for user input
 pinMode(buttonB, INPUT);
 pinMode(10, OUTPUT);
 pinMode(12, OUTPUT);
}
void loop(){
 int inputA = digitalRead(buttonA); // read voltage on pin, store value in variable
 if(inputA == 1){ // if button is pressed
 digitalWrite(10, HIGH); // turn on LED on pin 10
 }
 else{ // else (if button is not pressed)
 digitalWrite(10, LOW); // turn off LED on pin 10
 }
}

then what how do I add the two inputted values what + what? Thanks for the help btw

its just adding and displaying the value is whats getting me

I dont even know.. I just need this

  1. input values via a button
  2. show the values via leds
  3. add em
  4. display em

thats it?? but this is kind of hard

So they just go to the device and press a button and itll cycle through all the choices, then there will be another button to confirm their choice, then the same for the next addend then another button is pressed again to show the final result.

looking from a top view....

LED, LED, LED, LED, LED {Row 1 of LEDs} Store 1st addend
LED, LED, LED, LED, LED {Row 2 of LEDs} Store 2nd addend
LED, LED, LED, LED, LED {Row 3 of LEDs} Store answer (binary)

(button 1 choice button) (button 2 confirm addend) (button 3 shows answer)

Are you adding numbers like 310+610 or, numbers like 00112 + 01102?

So you're using 15 pins for output? That doesn't leave you much room for input. Do you have 15 current limiting resistors?