Unformatted text preview: ignore overﬂow. The output should be a 4-bit number. 2. (20 pts.) Dijkstra proposed a way to extend the GCD computer of Euclid to compute the Least Common Multiple (LCM) of two numbers. His recipe is as follows. Intially, the input number a is given to x and u ; the other number b is given to y and v . x = IF x > y THEN x-y ELSE x y = IF y > x THEN y-x ELSE y u = IF x > y THEN u + v ELSE u v = IF y > x THEN v + u ELSE v When x = y , the ( u + v ) / 2 will be the LCD of a and b . Please extend our GCD circuit for 3-bit numbers to an LCM circuit for 3-bit numbers. 1...
View Full Document
- Winter '08
- Arithmetic logic unit, Least common multiple