Quick answer

result_bit = (A + B + carry_in) mod 2; carry_out = floor((A + B + carry_in) / 2) for bits A and B in {0,1}.

Rules

  • sum_bit = A XOR B XOR carry_in
  • carry_out = majority(A, B, carry_in) in three-input columns
  • Multi-digit addition repeats per bit position from LSB to MSB

Introduction

Validate numeric results with the Binary Addition Calculator while you study the formulas below.

The formula view and the four-rule table describe the same process. Some learners prefer words; others prefer symbols before they touch logic gates.

If the four outcomes still feel new, review binary addition rules first, then return here for the compact notation.

Hardware designers use these lines when drawing full adders; students use them when proving homework is consistent with gate-level diagrams.

Column addition method

Label columns by power of two starting at 2^0 on the right. Each column hosts one bit from each operand plus optional carry-in.

Repeat the pair (result_bit, carry_out) for each position from least significant to most significant.

Multi-digit binary addition is a loop: carry_out at index i becomes carry_in at index i+1.

Arithmetic logic interpretation: sum bits come from XOR trees; carries from AND-OR combinations that detect counts of 2 or 3.

The formula generalizes to more than two operands by widening the sum before the mod-2 split, still emitting a single carry-out per column.

Formula explanation and logic view

  • result_bit = (bit_a + bit_b + carry_in) mod 2
  • carry_out = floor((bit_a + bit_b + carry_in) / 2)
  • Half adder: no carry_in; full adder: includes carry_in

XOR captures mod-2 behavior when carries are tracked on a separate wire. That is why introductory labs draw XOR for sum and AND/OR for carry.

A ripple-carry chain wires full adders in series. The numeric result matches paper addition when bit order is consistent.

After you can apply the formulas by hand, read binary adder circuits to see half and full adder blocks and how they chain into N-bit adders.

For classroom procedure rather than symbols, align bits by place value, add right to left, and verify in decimal after each sum.

Step-by-step guide

  1. Label columns by power of two. Rightmost column is 2^0. Pad with leading zeros if widths differ.
  2. Set carry_in = 0 for the rightmost column. Only the first column starts without an incoming carry unless the problem states otherwise.
  3. Apply the mod-2 and floor formulas. Write result_bit under the column; pass carry_out left.
  4. Stop when all operand columns are consumed. If a final carry-out remains, it may be an extra bit or an overflow flag depending on width.
  5. Cross-check with decimal conversion. Convert operands and sum to base 10 to confirm carries were chained correctly.

One column with three inputs

Let A=1, B=1, carry_in=1. Column sum is 3: result_bit = 3 mod 2 = 1, carry_out = floor(3/2) = 1.

In gate terms, all three inputs are high, so the full adder asserts both sum and carry-out according to its truth table.

Stack four columns to add 1011 and 1101; the formula repeats without changing shape.