Difference between revisions of "Binary Adders"

From Coder Merlin
Line 8: Line 8:
* [[W1016 Logic Composition]]
* [[W1016 Logic Composition]]
== Introduction ==
== Introduction ==
One of the most fundamental operations performed by computers, aside from the logical operations that we've already discussed, is the arithmetic operation of addition.  
One of the most fundamental operations performed by computers, aside from the logical operations that we've already discussed, is the arithmetic operation of addition. Let's consider what's required to add two, single-bit binary integers.  We'll need one bit to represent the '''sum''' or the integers, and another to handle the '''carry'''.  Representing this in the form of a truth table yields:
 
  {| class="wikitable" style="text-align: center;"
  !colspan="2"| Inputs
  !colspan="2"| Outputs
  |-
  ! <math>A</math>
  ! <math>B</math>
  ! <math>C</math>
  ! <math>S</math>
  |-
  | 0 || 0 || 0 || 0
  |-
  | 0 || 1 || 0 || 1
  |-
  | 1 || 0 || 0 || 1
  |-
  | 1 || 1 || 1 || 0
  |}
 
This is formally termed a '''half-adder''', a logic circuit capable of adding two bits.
 
{{Observe|Section 1|
# What truth table do you recognize that produces the output of the '''C'''arry column?
# What truth table do you recognize that produces the output of the '''S'''um column?
}}


== Topic Headers ==
== Topic Headers ==

Revision as of 14:30, 29 July 2019

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Half Adder

Prerequisites[edit]

Introduction[edit]

One of the most fundamental operations performed by computers, aside from the logical operations that we've already discussed, is the arithmetic operation of addition. Let's consider what's required to add two, single-bit binary integers. We'll need one bit to represent the sum or the integers, and another to handle the carry. Representing this in the form of a truth table yields:

Inputs Outputs
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

This is formally termed a half-adder, a logic circuit capable of adding two bits.

ObserveObserveIcon.png
Observe, Ponder, and Journal: Section 1
  1. What truth table do you recognize that produces the output of the Carry column?
  2. What truth table do you recognize that produces the output of the Sum column?

Topic Headers[edit]

Key Concepts[edit]

Exercises[edit]

References[edit]