代写 Name Student ID # Section

Name Student ID # Section
First Last
University of California Los Angeles Computer Science Department CSM51A Final Exam
Fall Quarter 2017
14t​ h​ December 2017
This is a closed book exam. Absolutely nothing is permitted except pen, pencil and eraser to write your solutions. Any academic dishonesty will be prosecuted to the full extent permissible by university regulations.
Time allowed 170 minutes
Problem (Possible points)
Points
1 (20)
2 (20)
3 (20)
4 (20)
5 (20)
Total (100)

Problem 1 (20 points)
Design a dedicated register file architecture that computes the following: M = 2x2yz + 3yzx + 3zx + 2x + 2
Use at most 5 cycles to implement this system. You may use at most one ALU and at most one multiplier. Minimize your hardware.

Problem 1 (Extra sheet)

Problem 2 (20 points)
You are given five 6-bit numbers: A, B, C, D and E. Find the largest and smallest numbers that are “Almost Palindrome” and compute the sum of them. You may use one 6-bit adder, one 2-bit comparator and any type of sequential and combinational logic gates to implement the system. You are not allowed to make additional comparators or adders with gates. You can assume that there is always at least ​two​ “Almost Palindrome” numbers in the input registers.
Definition of ​“Almost Palindrome”​: If a string is not palindrome and by changing exactly one bit, you can convert it to a palindrome string.
Example: 110001 is “Almost Palindrome” because by changing one bit, it will be converted to any of these palindromes: 1100​1​1 or 1​0​0001.

Problem 2 (Extra sheet)

Problem 3 (20 points)
a) Create a bidirectional shift-register using a modulo-16 counter. You may use multiplexers (as small and as few as possible)
b) Create a modulo-16 counter using a bidirectional shift register. You may use multiplexers (as small and as few as possible)

Problem 3 (Extra sheet)

Problem 4 (20 points)
Using the provided architecture below, implement the following program. (CLL0 is the write signal to LL0).
statement 1 : a = b + c; statement 2 : d = a + e; statement 3: f = a + c; statement 4 : g = f – d; statement 5 : h = g + I;

Problem 4 (Extra sheet)

Problem 5 (20 points)
A system receives a stream of data. Symbols a, b, c, and d form the stream. Design the system which finds the most popular (one most often generated) symbol called winner in each block of 32 input symbols. The system reports the number of winners and their value. Use only 2 data inputs multiplexers and shift registers.

Problem 5 (Extra sheet)