1. A calculator that performs the basic operations: addition, subtraction, multiplication, division.
2. Read pairs of 8-bit numbers from the input port, multiply them and output the result (16 bit) to the output port.
3. Read streams of bits from the input port, calculate the parity bit and output the bit stream plus the parity bit using the output port.
4. Implement a Finite State Machine that recognizes the language described by the regular expression a*(a+b*). Use ASCII codes for a and b.
5. Read a 12 bit integer from the input port #1, execute a delay() subroutine as many times as the read integer indicates, then activate the output port. The delay() subroutine would run for some predefined amount of time (say 10 microsecond, 1 millisecond, etc.) and do nothing otherwise. The delay is based on repeatedly executing some instruction(s) with a known execution time.
6. Implement the control for a microwave oven. The input information is:
The output will be:
7. Implement a simple controller for a car. The input is:
The output is:
8. A simple controller for house security. The controller continuously reads a keyboard pad (an array of 4x4 keys) and the status of sensors (a maximum of 16). If the alarm is enabled then the controller will activate the output port (which in turn will sound a horn) when any of the sensors is on (indicating a breach). The user can store a 4 digit password. The alarm will sound after 3 unsuccessful attempts to enter the password. The alarm can be disabled if the user enters the proper password.
9. A simple controller for a 12 key keypad (like the ones touchtone phones use). Every time a key is pressed a 4 bit binary code is output to the output port. This is true no matter how long the key stays pressed. The controller should do the key debouncing. Practically speaking this means the controller does not respond to glitches that appear due to mechanical contacts. When the controller senses a key has been pressed, it waits for some 10ms and checks that key again. If it finds it's still pressed then it outputs the proper binary code.
10. Read from the input a stream of 16bit integers (2's complement representation). Output the absolute value of each number.
11. Read from the input a stream of 16bit integers (2's complement representation). Output the value of each number in (2^15-1) biased representation.
|Last update: August 23, 2001||cs470 home page.||Computer Science home page|