PS1 solutions

# PS1 solutions - PS1 solutions 1 In this problem we are...

This preview shows pages 1–5. Sign up to view the full content.

PS1 solutions 1. In this problem, we are provided with an infinite number of add and multiply boxes. Each of these boxes has only two inputs and one output. Hence, we need to find a way to compute the given functions using these 2 input boxes. Please note that all input and output lines can be routed to multiple locations. Part (b): we need to add four inputs. So, we first add w,x and y,z and then add their outputs. To find the average, we need to divide by 4. So, we can multiply by 0.25. Part (c): Using the identity; a 2 + 2ab + b 2 = (a + b) 2 . We just need to add a,b and then multiply the output with itself. Part (d): There are two ways to do this: a 6 = (a 2 ) 2 x a 2 = (a 2 x a) 2 . OR a x b x + ax +b w x + + (w+x+y+z)*0.25 z + y x 0.25

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
b + x a 2 + 2ab + b 2 = (a + b) 2 a x x a 6 a x x x a 6 a x a) b) c) d)
2. In the problem we defined: 4 algorithms (one of it is bubble sort) that can be used with all programming languages 5 programming languages (C, C++, Pascal, FORTRAN and COBOL) that can be used on top of both ISA’s 2 ISA (x86 and SPARC) for each ISA we have 3 different microarchitectures (Core microarchitecture being one example of x86 microarchitecture) Algorithms

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Programming language ISA and microarchitecture a) So, the number of different transformation paths is equal to 4*5*6=120 b) bubble sort, C++, x86, Core microarchitecture bubble sort, COBOL, x86, Core microarchitecture bubble sort, Pascal, x86, Core microarchitecture
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 11

PS1 solutions - PS1 solutions 1 In this problem we are...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online