CSE 140L Hardware Lab One

Combinational Circuit Design:
Ripple Adder, Decoder/Encoder Circuits

Due date: 3rd week in class


Objective

In this lab, we will build a half-adder, a full-adder and a 4-bit adder from the full-adder. We will also build a gray-code encoder & decoder.


Part 1. Ripple Adder.

i. Design a full-adder starting with a half-adder. Briefly describe the design (how a 1/2 adder works and how putting together two 1/2 adders will make up a full-adder, mention the sum & carry in relation to the inputs).
ii. Use the enclosed full adder tutorial to build a full adder using xilinx program.
iii. Build a 4-bit adder using xilinx & simulate the 4-bit adder using xilinx.


Part 2. Construction of a Combinational Logic for the Gray-code ENCODER

Design a combinational logic circuit that converts three-bit binary code counter to three-bit gray-code counter (Gray Code ENCODER)

abc wxy
000 000
001 001
010 011
011 010
100 110
101 111
110 101
111 100

i. Briefly describe what a gray-code encoder is. Describe what is a hazard and how gray-code prevents hazards.
ii. Design the encoder circuit (K-map, Algebraic expression)
iii. Build the gray-code encoder circuit & simulate the gray-code encoder using xilinx.


Part 3. Construction of a Combinational Logic for the Gray-code DECODER

wxy efg
000 000
001 001
011 010
010 011
110 100
111 101
101 110
100 111

i. Briefly describe what a gray-code decoder is.
ii. Design the encoder circuit (K-map, Algebraic expression, etc.)
iii. Build the gray-code dncoder circuit & simulate the gray-code decoder using xilinx.


Part 4. Multiplexer

Build a circuit that translate a 8-bit parallel data to a serial output. Use only 2:1 Muxes.
i. Define the specification for this 8-bit parallel to serial circuit. (input, output & their relationship)
ii. Briefly describe how you design this circuit.
iii. Build and simulate the circuit using xilinx and demonstrate the simulation result.


Report
Title page:
  • Names of students and due date.
  • Title of the lab and objective.
  • A brief description of each person's contribution.

Content:
  • Part 1 i, ii, iii (include design & simulation for 1/2, full, and 4-bit adder).
  • Part 2 i, ii, iii
  • Part 3 i, ii, iii
  • Part 4 i, ii, iii
  • Attach the lab assignment at the end of the lab report.
  • Hint on a good report: Be descriptive but not wordy. Good example would be: Part 2.ii: The following is the design for the gray-code encoder. Think of yourself as the grader but doesn't have the hand out. The grader should know what you did in the lab without looking at the hand out. **Also, remember to label the simulation result (timing diagram) with 0's & 1's and short descriptions of what test-cases you have tested.

Grading

90% will based on the completeness and correctness of the report. 10% will based on the neatness, organization, and following instruction of the report format.