Skip to main content
Engineering LibreTexts

2.4: Adding Binary Whole Numbers

  • Page ID
    76100
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The final topic before covering how integer values are stored and used in a computer for calculations is how to do addition of binary whole numbers.

    When 2 one-bit binary numbers are added, the following results are possible: \(0_2+0_2 = 0_2; 0_2+1_2 = 1_2; 1_2+0_2 = 1_2;\) and \(1_2+1_2 = 10_2\). This is just like decimal numbers. For example, 3+4=7, and the result is still one digit. A problem occurs, however, when adding two decimal numbers where the result is greater than the base of the number (for decimal, the base is 10). For example, 9+8. The result cannot be represented in one digit, so a carry digit is created. The result of 9+8 is 7 with a carry of 1. The carry of 1 is considered in the addition for the next digit. This means that when adding two numbers together, adding the digits in the number requires 3 numbers (the two addends and the carry). So, 39 + 28 = 67, where the 10's digit (6) is the result of the two addends (3 and 2) and the carry (1).

    The result of \(1_2+1_2 = 10_2\) in binary is analogous to the situation in base 10. The addition of \(1_2+1_2\) is \(0_2\) with a carry of \(1_2\) to the next digit.

    An illustration of binary addition is shown in the figure below.

    Screen Shot 2022-03-24 at 12.52.27 AM.png

    Figure 1: Binary whole number addition

    Here the first bit adds \(1_2 + 1_2\), which yields a \(0_2\) in this bit and a carry bit of \(1_2\). The next bit now has to add \(1_2 +1_2 +1_2\) (the extra one is the carry bit), which yields a \(1_2\) for this bit and a carry bit of \(1_2\). If you follow the arithmetic through, you have \(0011_2\) (\(3_{10}\)) + \(0111_2 (7_{10}) = 1010_2 (10_{10})\).


    This page titled 2.4: Adding Binary Whole Numbers is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Charles W. Kann III via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?