(Redirected from W1017)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder Boy in sailor suit with blackboard with math

## Curriculum Coder Merlin™  Computer Science Curriculum Data Unit: Boolean algebra Experience Name: Binary Adders (W1017) Knowledge and skills: §10.331 Demonstrate understanding and proficiency in the use of binary adders Topic areas: Boolean algebra Classroom time (average): 30 minutes Study time (average): 60 minutes Successful completion requires knowledge: understand the construction and use of binary adders Successful completion requires skills: demonstrate proficiency in constructing and using binary adders

## 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.

Let's consider what's required to add two, single-bit binary integers. We'll need one bit to represent the sum of the integers, and another to handle the carry. Representing this in the form of a truth table yields: Inputs Outputs
$a$ $b$ $C_{out}$ $S$ 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 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?

In order to add two single-bit binary integers PLUS a carry, we need an adder capable of adding three single-bit binary numbers. Again, we'll need one bit to represent the sum of the integers, and another to handle the carry. Representing this in the form of a truth table yields: Inputs Outputs
$c_{in}$ $a$ $b$ $C_{out}$ $S$ 0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

This is formally termed a full-adder, a logic circuit capable of adding three bits.

Observe Observe, Ponder, and Journal: Section 2
1. What do you notice about the relationship between the first-half (top four rows) of the full-adder as compared to all of the rows of the half-adder?
2. Why is this true? We've learned that a half-adder can add two bits and full-adder can add three bits. How can we add a multi-bit number such as a 16-bit word? By cascading four adders such that the carry output of the prior adder feeds the carry input of the subsequent adder we can add two four-bit numbers. This concept can be easily extended to an arbitrary number of bits.

Observe Observe, Ponder, and Journal: Section 3
1. Why does the least significant bit position use a half-adder rather than a full-adder?
2. Assume that proper inputs are applied for all bits in numbers A and B. Will the correct output from S be available instantaneously? If not, why not?
3. Assume that we have a standard (non-scientific calculator) capable of adding two 16-bit words. Two numbers, A and B, are added together. After the addition, it is noted that $C_{15}$ is high. What can we infer? What is this state commonly called?

## Key Concepts

Key Concepts • A half-adder is a logic circuit capable of adding two bits and output a carry bit and a sum bit.
• A full-adder is a logic circuit capable of adding three bits and output a carry bit and a sum bit.
• A ripple-carry-adder is a logic circuit constructed of adders, cascaded in such a manner that the carry output of each adder feeds the carry input of the subsequent adder. Using this method we are able to add an arbitrary number of bits.

## Exercises

Exercises •  J1017  Create a journal and answer all questions in this experience. Be sure to:
• properly name your journal as J1017.txt
• include all sections of the journal, properly formatted
• push your changes to GitHub
• properly tag your journal as J1017.Final
• push your tag to GitHub

• All circuits must be on a single page
• Label the page (using Text) with:
• Save the document using the `Save As...` option from the File submenu and then click on the link presented