Homework 4 ECE 252 Spring 2008

# Homework 4 ECE 252 Spring 2008 - Homework 4 ECE 252 Spring...

This preview shows pages 1–3. Sign up to view the full content.

Homework 4 ECE 252 Spring 2008 Primary contact for this homework: Spyros Blanas [sblanas at cs dot wisc dot edu] You must do this homework alone. Please staple multiple pages together. Make sure to include your name and your section. Problem 1 One of the fundamental units of all processors is the unit which can handle simple arithmetic. For this problem, assume that you have a 1-digit full adder, a multiplexer, a decoder and all basic gates, all of which work as described in the class. a. Design an arithmetic unit which takes two 4-bit numbers in 2's complement representation, named A and B and a 1-bit "operation" flag O and produces the 4-bit result. If the O=0 then the output is A+B. If O=1 then the output becomes A-B. b. Extend your design by adding an overflow signal OVF which is 1 if and only if an arithmetic overflow occurs. Problem 2 Assume that at a pedestrian crossing the traffic light works in the following way: Green to vehicles, red to pedestrians for 20 seconds. Amber to vehicles, red to pedestrians for 5 seconds. Red to vehicles, green to pedestrians for 10 seconds. Red to vehicles and pedestrians for 5 seconds. The traffic light is controlled by a 5-bit value, which can be interpreted as follows: Bit Description 4 (MSB) Vehicle red light is on. 3 Vehicle amber light is on. 2 Vehicle green light is on. 1 Pedestrian red light is on. 0 (LSB) Pedestrian green light is on. (For example, using this representation, the value which turns all the red lights on is 10010.)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
a. Create the finite state machine which will control this traffic light if each clock cycle is 5 seconds. Show the output at each state. b. Add a pedestrian button which changes the traffic light to amber in the
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 03/30/2008 for the course ECE 252 taught by Professor Wood during the Spring '08 term at University of Wisconsin.

### Page1 / 5

Homework 4 ECE 252 Spring 2008 - Homework 4 ECE 252 Spring...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online