Unformatted text preview: ignore overﬂow. The output should be a 4bit 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 xy ELSE x y = IF y > x THEN yx 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 3bit numbers to an LCM circuit for 3bit numbers. 1...
View
Full Document
 Winter '08
 WU
 Arithmetic logic unit, Least common multiple

Click to edit the document details