Docsity

Introduction to Computer - Computer Engineering - Solved Exam, Exams of Computer Science

Toggle sidebar
bg1
ECE 2030 -- Introduction to Computer Engineering EXAM #2 SOLUTION
July 15, 2009 Page 1 of 3
Problem 1. (24 points)
Value
(decimal)
6-bit sign-magnitude
binary representation
6-bit 2โ€™s-complement
binary representation
29 0 1 1 1 0 1 0 1 1 1 0 1
โ€“ 14 1 0 1 1 1 0 1 1 0 0 1 0
23 0 1 0 1 1 1 0 1 0 1 1 1
โ€“ 26 1 1 1 0 1 0 1 0 0 1 1 0
โ€“ 10 1 0 1 0 1 0 1 1 0 1 1 0
0 0 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 1
+ 1 1 1 1 0 1 + 0 0 1 0 1 0 + 1 1 0 1 0 1
0 0 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 0
carry-out: 1 carry-out: 0 carry-out: 1
overflow: no overflow: yes overflow: no
1 0 1 1 0 0 0 1 0 0 1 0
โ€“ 1 1 0 1 1 1 โ€“ 1 1 0 1 0 1
1 1 0 1 0 1 0 1 1 1 0 1
overflow: no overflow: no
Problem 2. (12 points)
A. (4 points) Complete the state table for this register.
B. (8 points) Complete the following timing diagram for this
register. Assume that the initial value of the output is zero.
load toggle load hold
ฯ†
1
ฯ†
2
LD
T
IN
OUT
LD T OUT
+
0 0 OUT
0 1 OUT
1 x IN
pf3

Partial preview of the text

Download Introduction to Computer - Computer Engineering - Solved Exam and more Exams Computer Science in PDF only on Docsity!

July 15, 2009 Page 1 of 3

Problem 1. (24 points)

Value (decimal)

6-bit sign-magnitude binary representation

6-bit 2โ€™s-complement binary representation

29 0 1 1 1 0 1 0 1 1 1 0 1

  • 14 (^) 1 0 1 1 1 0 1 1 0 0 1 0 23 0 1 0 1 1 1 0 1 0 1 1 1 - 26 1 1 1 0 1 0 **1 0 0 1 1 0
  • 10 1 0 1 0 1 0** 1 1 0 1 1 0

carry-out: 1 carry-out: 0 carry-out: 1 overflow: no overflow: yes overflow: no

1 0 1 1 0 0 0 1 0 0 1 0

- 1 1 0 1 1 1 โ€“ 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 overflow: no overflow: no

Problem 2. (12 points)

A. (4 points) Complete the state table for this register.

B. (8 points) Complete the following timing diagram for this register. Assume that the initial value of the output is zero.

load toggle load hold

ฯ† 1

ฯ† 2

LD

T

IN

OUT

LD T OUT

0 0 OUT 0 1 OUT 1 x IN

July 15, 2009 Page 2 of 3

Problem 3. (20 points)

A. (1 point) Mealy machine (Z is a function of both the state and input X)

B. (4 points)

C. (12 points)

D 1 = S 1 S 0 X + S 1 S 0 X

D 0 = S 1 S 0 + S 0 X

Z = S 1 S 0 X

D. (2 points) 1 0 1 (state sequence: A -> B -> D -> C)

E. (1 point) No ( For input sequence 1 0 1 0 1, only the first sequence is detected.)

Problem 4. (14 points)

A. (7 points) Moore machine B. (7 points) Mealy machine

0 1 00 01 1

11 1 10

S 1 S 0

X

D 1

0 1 00 1 01 1 1

11 10 1

S 1 S 0

X

D 0

0 1 00 01

11 1

10

S 1 S 0

X

Z

A B C

D

init 00

1 eq 00

1 opp 00

2 +^ eq 10

2 +^ opp 01

01 /00 init^ 00/

1 + eq

1 + opp