Computer Organization Assignment 3: Solutions for Problems 37 & 40, Instructions for Probl, Assignments of Computer Architecture and Organization

The solution for problems 37 and 40 from chapter 3, and instructions for problems 13, 15(a), and 15(b) from computer organization assignment 3. It includes hexadecimal addresses, instructions, binary codes, and comments.

Typology: Assignments

Pre 2010

Uploaded on 03/19/2009

koofers-user-ftv
koofers-user-ftv 🇺🇸

4

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
22C: 060 Computer Organization
Assignment 3
Sample Solution
Chapter 3, Problem 37
Here is the trace. Call the four Q’s (from left to right) Q4 Q3 Q2 Q1:
Q4 Q3 Q2 Q1
1
2
3
4
5
6
7
8
9
0 0 0 0
1 0 0 0
1 1 0 0
1 1 1 0
1 1 1 1
0 1 1 1
0 0 1 1
0 0 0 1
0 0 0 0
It is called a twisted ring counter or a Johnson counter. This circuit can count up and down (up to 4).
Chapter 3, Problem 40
The question is awkward, since it forces an value into the Z-input, making the connection from Q to Z a
meaningless one. Also, the –O—on the carry output C confuses readers about whether an inversion in
implied there (apparently not). I have given points regardless of how you interpreted it.
X Y Z
S Q
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
0 0
1 0
1 0
0 1
1 0
0 1
0 1
1 1
Chapter 4, Problem 13
Label
Hex address
Instruction
Binary
100
Load A
0001 0001 0000 1000
101
Add One
0011 0001 0000 1001
102
Jump S1
1001 0001 0000 0110
S2
103
Add One
0011 0001 0000 1001
104
Store A
0010 0001 0000 1000
105
Halt
0111 0000 0000 0000
S1
106
Add A
0011 0001 0000 1000
107
Jump S2
1001 0001 0000 0011
A
108
HEX 0023
0000 0000 0010 0011
One
109
HEX 0001
0000 0000 0000 0001
pf2

Partial preview of the text

Download Computer Organization Assignment 3: Solutions for Problems 37 & 40, Instructions for Probl and more Assignments Computer Architecture and Organization in PDF only on Docsity!

22C: 060 Computer Organization

Assignment 3

Sample Solution

Chapter 3, Problem 37 Here is the trace. Call the four Q’s (from left to right) Q4 Q3 Q2 Q1:

Q4 Q3 Q2 Q 1 2 3 4 5 6 7 8 9 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0

It is called a twisted ring counter or a Johnson counter. This circuit can count up and down (up to 4).

Chapter 3, Problem 40 The question is awkward, since it forces an value into the Z-input, making the connection from Q to Z a meaningless one. Also, the –O—on the carry output C confuses readers about whether an inversion in implied there (apparently not). I have given points regardless of how you interpreted it.

X Y Z S Q 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

Chapter 4, Problem 13

Label Hex address Instruction Binary Hex 100 Load A 0001 0001 0000 1000 1108 101 Add One 0011 0001 0000 1001 3109 102 Jump S1 1001 0001 0000 0110 9106 S2 103 Add One 0011 0001 0000 1001 3109 104 Store A 0010 0001 0000 1000 2108 105 Halt 0111 0000 0000 0000 7000 S1 106 Add A 0011 0001 0000 1000 3108 107 Jump S2 1001 0001 0000 0011 9103 A 108 HEX 0023 0000 0000 0010 0011 0023 One 109 HEX 0001 0000 0000 0000 0001 0001

Chapter 4, Problem 15(a)

(i) Store 007 (hex address) (ii) Jump 10B (hex address) (iii) Add 009 (hex address)

Chapter 4, Problem 15(b)

Label Address Instruction Comments 100 Load X Load X into the AC 101 Subt One AC:= AC- 102 Skipcond 800 if AC>O then skip the next instruction 103 Jump Endif Go to the Else part 104 Load X AC:= X 105 Add X AC: = X+X 106 Store Y Store AC into Y 107 Clear AC:= 108 Store X X becomes 0 now Endif. 109 Load Y Load Y into AC 10A Add One AC:= Y+ 10B Store Y Store AC into Y End. 10C Halt Terminate the program X 10D some value Y 10E some value One 10F Dec 1