ECE 645

Computer Arithmetic
Spring 2010

Time and location:   Tuesday, 7:20-10:00 PM, Innovation Hall 137

Instructor:                  Kris Gaj     
Email:                          kgaj (at)
Office hours:             Monday, 7:30-8:30 PM, Tuesday, 6:00-7:00 PM, and by appointment

TA:                              "Ice" - Ekawat Homsirikamol
Email:                          ehomsiri (at)


Required Textbooks 

Behrooz Parhami, Computer Arithmetic: Algorithms and Hardware Design, 2nd Edition, Oxford University Press, New York, 2010, ISBN 978-0-19-532848-6.

Jean-Pierre Deschamps, Gery Jean Antoine Bioul, Gustavo D. Sutter,  Synthesis of Arithmetic Circuits: FPGA, ASIC and Embedded Systems,  Wiley-Interscience, 2006, ISBN 978-0-471-68783-2.

Recommended Textbooks

Milos D. Ercegovac and Tomas Lang, Digital Arithmetic, Morgan Kaufmann Publishers, 2004.

Isreal Koren, Computer Arithmetic Algorithms, 2nd edition, A. K. Peters, Natick, MA, 2002, ISBN 1-56881-160-8.

Sundar Rajan, Essential VHDL: RTL Synthesis Done Right, S & G Publishing, 1998.

Volnei A. Pedroni, Circuit Design with VHDL, The MIT Press, 2004, ISBN: 0-262-16224-5.

Other literature

Software Packages Used in This Class

Course Description

Course Outline (subject to possible modifications):

  1. Number Representation: Part 1    01/19/2010
  2. Number Representation: Part 2    01/26/2010, 02/16/2010
  3. Operations in the Galois Field GF(2n). Basic Adders.     02/23/2010
  4. Implementation of Adders in FPGAs. Counters.    03/02/2010
  5. Carry-Lookahead and Carry-Select Adders. Conditional-Sum Adder. Hybrid Adders.  03/09/2010   
  6. Parallel Prefix Network Adders. Multioperand Addition.    03/16/2010
  7. Tree and Array Multipliers. Multiplication in FPGAs.: Part 1    03/23/2010
  8. Tree and Array Multipliers. Multiplication in FPGAs.: Part 2    03/30/2010
  9. Midterm Exam    04/06/2010
  10. Sequential Multipliers: Part 1   04/13/2010
  11. Sequential Multipliers: Part 2   04/20/2010
  12. Serial Multipliers. Modular Multipliers.    04/27/2010
  13. Dividers    05/04/2010

Lecture slides

Lecture 9: Basic Dividers

Lecture 8: Sequential Multipliers

Lecture 7: Tree and Array Multipliers.

Lecture 6: Multioperand addition.

Lecture 5: Conditional-Sum Adder. Parallel Prefix Network Adders.

Lecture 4: Carry-Lookahead & Carry-Select Adders.

Lecture 3: Basic Adders and Counters. Implementation of Adders in FPGAs.

Lecture 2: Number Representation - Part 2

Lecture 1: Number Representation - Part 1

Lecture 0: Objectives, Scope, and Organization of the Course

Posted gradually before a given lecture.

See course web pages from Spring 2008 and Spring 2009 for slides from two previous years.


Project 2 - Option 2

Specification of Project 2 - Option 2

Multi-Cycle Path Tutorial v. 1.0 - 05/03/2010

Multi-Cycle Path Example

Project 2 - Option 1


ATHENa v.0.4.4

Universal Hash Testbench v. 2.1 - 04/23/2010


Project 1

Specification of Project 1

Materials related to the course projects will be posted gradually over the duration of the course.

See course web pages from Spring 2008 and Spring 2009 for project-related materials from two previous years.


Homework Assignments

Homework 3 - due Tuesday, March 16

Homework 2 - due Tuesday, March 2

Homework 1 - due Tuesday, February 2 

Posted gradually about a week before a given assignment is due.

See course web pages from Spring 2008 and Spring 2009 for homework assignments from two previous years.


Reference Materials

Computer Arithmetic Algorithms Simulators

Simulator by Isreal Koren



VHDL Instructions: Templates & Examples

OpenCores Coding Guidelines

The Low Carb VHDL Tutorial - by Bryan Mealy

VHDL Tips & Tricks - a very useful set of slides from the Integrated Systems Laboratory, ETH Zurich


FPGA Devices and Tools

Introduction to FPGA Devices and Tools

GMU FPGA CAD Tools at School and Home

Active HDL Student Edition

Xilinx ISE WebPACK - main page

Xilinx ISE WebPACK - FAQ


Related course web pages

ECE 645: Spring 2009 (with Dr. Gaj),  Spring 2008 (with Dr. Hwang), 

ECE 545: Fall 2009 (with Dr. Gaj), Fall 2008 (with Dr. Hwang)

ECE 448: Spring 2010 (with Dr. Gaj), Spring 2009 (with Dr. Gaj)


Practice Exams

DISCLAIMER: The exams from previous years are not representative of the material covered in class this semester, and may include questions you are not required to know solutions to, and omit material covered in the class this year.

Practice Midterm Exam from Spring 2005

Practice Midterm Exam from Spring 2004

Midterm Exam from Spring 2009

Final Exam from Spring 2009

Midterm Exam 1 from Spring 2007

Midterm Exam 2 from Spring 2007

Midterm Exam 2 from Spring 2006

Midterm Exam 1 from Spring 2005

Midterm Exam 2 from Spring 2005

Midterm Exam 1 from Spring 2004

Midterm Exam 1 from Spring 2002

Midterm Exam 1 from Spring 2000