Intro to arithmetic circuits
 

  • From CS255:

      • The computer can only perform arithmetic and logical operations on (binary) numbers

  • In addition to switching circuits (e.g.: multiplexor, decoder, ...), a second major category of circuits found inside the CPU are circuits that do computations:

      • Arithmetic operations: addition, subtraction, multiplication and division
      • Logical operations: AND, OR, NOT, etc

Arithmetic circuits studied in CS355
 

We will study how to construct the following arithmetic circuits:

  • The ripple carry adder circuit that can perform addition of binary numbers

  • A subtraction circuit contructed using the ripple carry adder

  • A multiplication circuit constructed using (multiple) ripple carry adders

  • (We will not study circuits that performs division - it's too time consuming, we need the time to explain the other operations within the computer)

How to make arithmetic circuits in general
 

The general approach to design/construct any arithmetic circuit is to use the circuit design methodology discussed previously:

  1. List out every combination of the input values

  2. Determine the output for each combination of input values

  3. Construct the digital circuit using NOT, AND, and OR gates

See this teaching slide set: click here

However: when you use this circuit design method, you will not be able to make a viable cuicuit !!!

Applying the general circuit design technique on a "4 bit adder" circuit

Suppose we want to design a circuit that can add two 4-bits (binary) numbers:

Applying the general circuit design technique on a "4 bit adder" circuit

The logic table for this 4-bit adder circuit will look like this:

The logic table for a 4 bit adder has 28 (= 256) rows !!!

Why the general circuit design method fails
 

  • An adder circuit to add two 32 bit binary number will have 264 rows

  • 264 rows = 18446744073709551616 = 18446744 trillion !!

    We can never make this many number of transistors, so let alone AND, OR, NOT gates (that are made up of transistors) !!!

 

We must make some trade offs in order to make viable 32 (or larger) arithmetic circuits