Wallace Tree Adder
Theory

Design of Wallace Tree Adders :

There are many cases where it is desired to add more than two numbers together. The straightforward way of adding together m numbers (all n bits wide) is to add the first two, then add that sum to the next using cascading full adders. This requires a total of m − 1 additions, for a total gate delay of O(m lg n) (assuming lookahead carry adders). Instead, a tree of adders can be formed, taking only O(lg m · lg n) gate delays.

A Wallace tree adder adds together n bits to produce a sum of log2n bits.

The design of a Wallace tree adder to add seven bits (W7) is illustrated below:

7-bit Wallace tree Adder

An adder tree to add three 4-bit numbers is shown below:

Adder tree to add three 4-bit numbers

An adder tree (interconnections incomplete) to add five 4-bit numbers is shown below:

Adder tree to add five 4-bit numbers
--->

The above block diagrams can be used to design different wallace tree adder.

Objective

Objective of 4 bit Wallace Tree Adder:

This is an adder with less height.

  1. understanding behaviour of wallace tree adder from module designed by the student as part of the experiment an dthe working module as well
  2. understanding the concept of reducing gate delay by using tree of adders instead of using cascaded full adders
  3. the adder will add three 4 bit numbers

Examining behaviour of wallace tree adder for the module designed by the student as part of the experiment (refer to the circuit diagram)

Loading data in the carry lookahead adder (refer to procedure tab for further detail and experiment manual for pin numbers)

  • load the three input numbers in the adder units as:
    • 1111, 0001 and 1110

Examining the behaviour:

  • check output sum 1110
  • check final output carry 1
  • check intermediate carry bit and sum bit of the unit adders (refer to theory and circuit diagram)
  • probing the any port can be done by verifying the color of the wire coming out of the port
  • color configuration of wire for 5 valued logic supported by the simulator:
    • if value is UNKNOWN, wire color= maroon
    • if value is TRUE, wire color= blue
    • if value is FALSE, wire color= black
    • if value is HI IMPEDENCE, wire color= green
    • if value is INVALID, wire color= orange

Examining behaviour of given wallace tree adder for the workng module:

Loading data in the wallace tree adder (refer to procedure tab for further detail and experiment manual for pin numbers) as:

  • load the three input numbers as:
    • A(A3 A2 A1 A0): A3=1, A2=1, A1=1, A0=1
    • B(B3 B2 B1 B0): B3=0, B2=0, B1=0, B0=1
    • C(C3 C2 C1 C0): C3=1, C2=1, C1=1, C0=0

Examining the behaviour:

  • check output sum:
    • sum(S3 S2 S1 S0): S3=1, S2=1, S1=1, S0=0
  • check output carry:
    • cout=1

Recommended learning activities for the experiment: Leaning activities are designed in two stages, a basic stage and an advanced stage. Accomplishment of each stage can be self-evaluated through the given set of quiz questions consisting of multiple type and subjective type questions. In the basic stage, it is recommended to perform the experiment firstly, on the given encapsulated working module, secondly, on the module designed by the student, having gone through the theory, objective and procuder. By performing the experiment on the working module, students can only observe the input-output behavior. Where as, performing experiments on the designed module, students can do circuit analysis, error analysis in addition with the input-output behavior. It is recommended to perform the experiments following the given guideline to check behavior and test plans along with their own circuit analysis. Then students are recommended to move on to the advanced stage. The advanced stage includes the accomplishment of the given assignments which will provide deeper understanding of the topic with innovative circuit design experience. At any time, students can mature their knowledge base by further reading the references provided for the experiment.

  • color configuration of wire for 5 valued logic supported by the simulator:
    • if value is UNKNOWN, wire color= maroon
    • if value is TRUE, wire color= blue
    • if value is FALSE, wire color= black
    • if value is HI IMPEDENCE, wire color= green
    • if value is INVALID, wire color= orange

    Test Plan :

    1. Take three 4-bits number. Give proper inputs to check the identity, commutativity, associativity of addition operation with interchanging input values, setting zero(0) to one input.

    Use Display units for checking output. Try to use minimum number of components to build. The pin configuration of the canned components are shown when mouse hovered over a component.

    Assignment Statements :

    You are required to build the following Wallace tree adders

    1. Adder to add seven bits
    2. Adder to add three 4-bit numbers
    3. Adder to add five 4-bit numbers
    4. Adder to add seven 4-bit numbers

  • Procedure

    Design of Wallace Tree Adders:

    Procedure to perform the experiment:Design of Wallace Tree Adder

    1. Start the simulator as directed.This simulator supports 5-valued logic.
    2. To design the circuit we need 4 full adder, 1 'RCA 4 bit' component, 12 Bit switch(to give input), 5 Bit displays(for seeing output), wires.
    3. The pin configuration of a component is shown whenever the mouse is hovered on any canned component of the palette or press the 'show pinconfig' button. Pin numbering starts from 1 and from the bottom left corner(indicating with the circle) and increases anticlockwise.
    4. For a full adder input is in pin-5,6,8, output sum is in pin-4 and carry is pin-1
    5. For a 'RCA 4 bit' input A0=pin-13 A1=pin-14 A2=pin-15 A3=pin-16, B0=pin-17 B1=pin-18 B2=pin-19 B3=20, C0=21, output S0=pin-12 S1=pin-11 S2=pin-10 S3=pin-9 Cout=pin-8
    6. Click on the full adder component(in the Adder drawer in the pallet) and then click on the position of the editor window where you want to add the component(no drag and drop, simple click will serve the purpose), likewise add 3 more full adder(from the Adder drawer in the pallet), 1 'RCA 4 bit'(from the Adder drawer in the pallet,if it is not seen scroll down in the drawer), 12 Bit switches and 5 Bit Displays(from Display and Input drawer of the pallet,if it is not seen scroll down in the drawer).connect the Bit switches with the inputs and Bit displays component with the outputs.
    7. To connect any two components select the Connection menu of Palette, and then click on the Source terminal and click on the target terminal. According to the circuit diagram connect all the components. After the connection is over click the selection tool in the pallete.
    8. See the output, Bit switches are used to give input so that you can toggle its value with a double click and see the outputs with different inputs.

    Circuit Diagram

    Components :

    To build a wallace tree adder to add three 4-bit input , we need :

    1. 4 full adders
    2. 4-bit adder
    3. Display units to check the outputs.
    4. Wires to connect.
    Experiment

    Design of Wallace Tree Adders :

    General guideline to use the simulator for performing the experiment:

    • Start the simulator as directed. For more detail please refer to the manual for using the simulator
    • The simulator supports 5-valued logic
    • To add the logic components to the editor or canvas (where you build the circuit) select any component and click on the position of the canvas where you want to add the component
    • The pin configuration is shown when you select the component and press the 'show pinconfig' button in the left toolbar or whenever the mouse is hovered on any canned component of palette
    • To connect any two components select the connection tool of palette, and then click on the source terminal and then click on the the target terminal
    • To move any component select the component using the selection tool and drag the component to the desired position
    • To give a toggle input to the circuit, use 'Bit Switch' which will toggle its value with a double click
    • Use 'Bit Display' component to see any single bit value. 'Digital Display' will show the output in digital format
    • undo/redo, delete, zoom in/zoom out, and other functionalities have been given in the top toolbar for ease of circuit building
    • Use start/stop clock pulse to start or stop the clock input of the circuit. Clock period can be set from the given 'set clock' button in the left toolbar
    • Use 'plot graph' button to see input-output wave forms
    • Users can save their circuits with .logic extension and reuse them
    • After building the circuit press the simulate button in the top toolbar to get the output
    • If the circuit contains a clock pulse input, then the 'start clock' button will start the simulation of the whole circuit. Then there is no need to again press the 'simulate' button

    Software for conducting the experiment, as appropriate for your platform, may be downloaded via SOFTWARE

    Software

    General guideline to use the Simulator Software for performing the experiments:

    • Windows (64 bit)
    • Click here to download the 64 bit version of simulator

      PATH needs to be set:

      1. Java runtime environment is needed (may get from java.com)
      2. Install downloaded jre
      3. Right click on My Computer/This PC
      4. Select Properties
      5. Select Advanced System Settings
      6. Select Advanced tab
      7. Select Environment Variables
      8. Select Path under System Variables
      9. Click on Edit button
      10. In Variable value editor paste this at the start of the line
        C:\Program Files\Java\< jdk_version >\bin;
      11. Click Ok then Ok again

      If your environment is properly set up, you may open by double clicking on the jar file, otherwise use the following command:
      java -jar coldvl64Windows.jar

    • Linux (64 bit)
    • Click here to download the 64 bit version of simulator

      Once the simulator is downloaded, open the command prompt, then go to the directory where you have saved it using cd command and then give the following command to run the simulator:
      java -jar coldvl64Linux.jar


    • If you are using linux platform then click on links under 'Linux(32 bit)' or if you are using then click on links under 'Windows(32 bit)' to download the Simulator Software
    • Linux(32 bit)
    • Click here to download the new version of simulator

      Once the simulator is downloaded, open the command prompt, then go to the directory where you have saved it using cd command and then give the following command to run the simulator:
      java -jar coaSimulatorNew.jar

    • Windows(32 bit)
    • Click here to download the new version of simulator

      Once the simulator is downloaded, open the command prompt, then go to the directory where you have saved it using cd command and then give the following command to run the simulator:
      java -jar SimulatorNew.jar

    Manuals

    You can download the Manuals from below mentioned links


    Quizes

    Design of Wallace Tree Adders:

    Basic stage

    Multiple choice questions:

    • Carry look ripple delay is eliminated in?
    • Full adder

      Half adder

      Parallel adder

      Carry look ahead adder


    • What is the main difference between half-adders and full-adders?
    • Nothing basically; full-adders are made up of two half-adders

      Full-adders can handle double digit numbers

      Full-adders have a carry input capability

      Half-adders can only handle single digit numbers


    • Which one of the following will give the sum of full adders as output?
    • Three bit parity checke

      Three point majority circuit

      Three bit counter

      Three bit comparator


    • Parallel adder is
    • Combinational circuit

      Sequential circuit

      Both

      None of these


    • A full binary tree with n leaf nodes contains
    • 2n nodes

      (n+1) nodes

      n nodes

      (2n-1) nodes


    Subjective questions:

    • What is the gate delay in a wallace tree adder for adding m (each having n bits) numbers?
    • What is the number of bits in 'sum' output while adding n bits together in a wallace tree adder?

    Advanced stage

    Multiple choice questions:

    • The number of edges in a tree with n nodes
    • n+1

      n-1

      2n

      n


    • what is the number of full adders and half adders needed to add 16-bit numbers?
    • 5 full adder, 1 half adder

      5 full adder, 5 half adder

      12 full adder, 4 half adder

      None of these


    • How many gate levels are propagated by the carry in an m-bit parallel adder?
    • m

      m+1

      2m

      None of these


    • How many full adders are needed to design an n-bit parallel adder?
    • n

      n-1

      n+2

      n/2


    Subjective questions:

    • What is the advantage of using wallace tree adder over carry look ahead adder?
    • What is the different gate delays for adding m (each having n bits) numbers in wallace tree adder and carry look ahead adder respectively?

    Reference

    Design of Wallace Tree Adders :

    Books:

    1. Carry-Save Addition - Prof. Loh,CS3220 - Processor Design - Spring 2005,February 2, 2005
    2. Digital Logic and Computer Design - M. Morris Mano. Pearson Education - Prentice Hall.
    3. Digital Principles Foundation of Circuit Design and Application - Arun Kumar Singh. New Age Publishers.
    4. The Art of Electronics - Paul Horowitz and Winfield Hill (1989). Cambridge University Press
    5. Modern Dictionary of Electronics - Rudolf F. Graf (1999). Newnes

    Web Sites:

    Feedback