Docsity

Homework Set 2 in CPSC 2105: Introduction to Computer Organization, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
CPSC 2105 Introduction to Computer Organization
Homework Set 2 Due Wednesday, April 4, 2007
HOMEWORK KEY WITH ANSWERS AND COMMENTS
1. Use a 2–to–4 active–high decoder and an OR gate to implement the
exclusive NOR function F(X, Y) = NOT (X Y).
Answer: Let’s look at the truth table implementation of NOT(X Y).
Row X Y X Y NOT(X Y)
0 0 0 0 1
1 0 1 1 0
2 1 0 1 0
3 1 1 0 1
We can write F(X, Y) = NOT(X Y) = (0, 3). This leads immediately to the answer.
2. Use a 4–to–1 multiplexer to implement the same function.
Answer: We still have F(X, Y) = NOT(X Y) = (0, 3). This also gives the answer.
pf3

Partial preview of the text

Download Homework Set 2 in CPSC 2105: Introduction to Computer Organization and more Assignments Computer Architecture and Organization in PDF only on Docsity!

CPSC 2105 Introduction to Computer Organization

Homework Set 2 Due Wednesday, April 4, 2007

HOMEWORK KEY WITH ANSWERS AND COMMENTS

  1. Use a 2–to–4 active–high decoder and an OR gate to implement the exclusive NOR function F(X, Y) = NOT (X  Y). Answer: Let’s look at the truth table implementation of NOT(X  Y). Row X Y X  Y NOT(X  Y) 0 0 0 0 1 1 0 1 1 0 2 1 0 1 0 3 1 1 0 1

We can write F(X, Y) = NOT(X  Y) = (0, 3). This leads immediately to the answer.

  1. Use a 4–to–1 multiplexer to implement the same function.

Answer: We still have F(X, Y) = NOT(X  Y) = (0, 3). This also gives the answer.

  1. Convert the following expression from reverse Polish (Postfix) notation to infix. U V W X Y Z + * + * + Note that “*” denotes multiplication. Answer: All of the operations shown are binary. The rule for converting postfix to standard notation requires matching each operator with the two immediately previous expressions that can serve as operands. U V W X Y Z + * + * + U V W X (Y Z +) * + * + better written as U V W X (Y + Z) * + * + U V W [X (Y + Z) *] + * + better written as U V W [X * (Y + Z)] + * +

U V (W [X * (Y + Z)] +) * + better written as U V (W + [X * (Y + Z)]) * +

U [V (W + [X * (Y + Z)]) *] + better written as U [V * (W + [X * (Y + Z)])] +

U + [V * (W + [X * (Y + Z)])] better written as U + V * (W + [X * (Y + Z)])

also written as [ (Y + Z) * X + W ] V + U also written as U + VW + VX(Y + Z)

  1. You are given the following memory map of a byte addressable memory. Address FF 100 101 102 103 104 105 106 107 108 Contents 66 FF 55 BA D1 22 11 44 33 77 All values shown are hexadecimal. What is the hexadecimal value of the 32–bit integer stored at address 104 if a) The number is stored in big–endian form. b) The number is stored in little–endian form. Answer: The 32–bit integer stored at address 104 comprises four bytes, those at addresses 104, 105, 106, and 107. Address 104 105 106 107 Contents 22 11 44 33 a) Big endian 0x22 11 44 33 (spaces only to help reading the answer) b) Little endian 0x33 44 11 22