0% found this document useful (0 votes)
163 views

HW 1

This homework assignment asks students to summarize key concepts about computers and complete several implementation exercises: 1) Explain what a computer is, what computation is, how a computer can be implemented, and required components. 2) Determine if an hour clock is a computer and implement one using a memory cell and functional units. 3) Determine if a traffic light is a computer and implement a set of traffic lights using 3 memory cells and functional units. 4) Implement Euclid's algorithm for finding the greatest common divisor (GCD) using two memory cells and functional units.

Uploaded by

tash7827
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
163 views

HW 1

This homework assignment asks students to summarize key concepts about computers and complete several implementation exercises: 1) Explain what a computer is, what computation is, how a computer can be implemented, and required components. 2) Determine if an hour clock is a computer and implement one using a memory cell and functional units. 3) Determine if a traffic light is a computer and implement a set of traffic lights using 3 memory cells and functional units. 4) Implement Euclid's algorithm for finding the greatest common divisor (GCD) using two memory cells and functional units.

Uploaded by

tash7827
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Homework 1

EECS 203

1. (20 pts.) Please explain what is a computer, what is a computation, how a computer can be implemented, and
what components are needed in a computer?
2. (20 pts.) A hour clock is a clock with only the hour reading, that is, it goes from 1 to 2, then 3, 4, ..., till 12, and
then back to 1. Based on our definition of computer, is a hour clock a computer? Given a memory cell and any
functional units you specify, implement a hour clock.
3. (30 pts.) At cross streets, traffic lights are essential for controlling traffic to avoid collisions. Normal traffic
lights consist of two sets of three lights: red, yellow, and green. Based on our definition of computer, is a set of
traffic lights a computer? Given 3 memory cells, any functional units you specify, and two sets of red, yellow,
and green lights, implement a set of traffic lights.
4. (30 pts.) Please note that Euclid’s algorithm can be modified as follows:

put a and b into memory x and y;


while (y 6= 0) {
x:= IF (x ≥ y) THEN x − y ELSE y
y:= IF (x ≥ y) THEN y ELSE x
}
output x;

Run this algorithm by hand on the input of 27, 45 to convince its correctness. Then please use two memory cells
and any functional units you specify to implement this GCD computer.

You might also like