Docsity

ECE2030: Introduction to Computer Engineering Test #2, Exams of Computer Science

Toggle sidebar
bg1
STUDENT NAME and NUMBER: (PLEASE PRINT CLEARLY)
REMARKS: 1. All questions should be answered (in the space provided).
2. Books and notes may NOT be used, with the exception of one 8.5”x11” sheet of paper.
DATE: October 26, 2000 TIME: 4:35 p.m. - 5:55 p.m.
Marks:
Total:
Q1
Q2
Q3
Q4
v. 1.0 - 1 of 8 -
Georgia Institute of Technology
Department of Electrical and Computer Engineering
Test #2
ECE2030: Introduction to Computer Engineering Q5
1. NUMBER SYSTEMS AND ARITHMETIC (MAX MARK: 20)
a) Represent the following numbers in binary two’s complement form using 5-bits.
b) Add the following 5-bit unsigned numbers. Indicate if a range overflow has occured.
c) Add the following 5-bit signed two’s complement numbers. Indicate if a range overflow has occured.
110 =
-110 =
-810 =
-710 =
01011
00111
+
01011
10010
+
11100
11010
+
Overflow
yes or no?
01111
00011
+
00011
11010
+
11110
11000
+
Overflow
yes or no?
/20
/20
/20
/20
/20
/100
pf3
pf4
pf5
pf8

Partial preview of the text

Download ECE2030: Introduction to Computer Engineering Test #2 and more Exams Computer Science in PDF only on Docsity!

STUDENT NAME and NUMBER: (PLEASE PRINT CLEARLY)

REMARKS: 1. All questions should be answered (in the space provided).

  1. Books and notes may NOT be used, with the exception of one 8.5”x11” sheet of paper.

DATE: October 26, 2000 TIME: 4:35 p.m. - 5:55 p.m.

Marks:

Total:

Q

Q

Q

Q

Georgia Institute of Technology Department of Electrical and Computer Engineering

Test

ECE2030: Introduction to Computer Engineering Q

1. NUMBER SYSTEMS AND ARITHMETIC (MAX MARK: 20)

a) Represent the following numbers in binary two’s complement form using 5-bits.

b) Add the following 5-bit unsigned numbers. Indicate if a range overflow has occured.

c) Add the following 5-bit signed two’s complement numbers. Indicate if a range overflow has occured.

+^00111

+^10010

+^11010

Overflow yes or no?

+^00011

+^11010

+^11000

Overflow yes or no?

d) Find the diminished radix complement of the following octal number using 3 digits. (Hint: You can approach this using octal math or by converting to binary, performing the appropriate complement, and then converting back to octal.)

2. COMBINATIONAL BUILDING BLOCKS (MAX MARK: 20)

a) Someone has mixed up the input columns of the truth table for a 4-to-2 priority encoder. List out the priority order for each of the inputs In k from highest priority to lowest priority.

b) Implement the logic circuit for the following truth table using a 3-to-8 decoder and a minimal set of any other simple gates that may be required (AND, OR, NAND, NOR, NOT).

X

X

X

X

X

X

Ina Inb Inc Ind

Inputs Outputs

Z 1 Z 0

Highest priority

Lowest priority

X 2 X 1

Z 1

Inputs Outputs

X 0

Z 0

b) Complete the below timing diagram where Q 1 is the output of a transparent latch , Q 2 the output of a positive edge-triggered flip-flop , and Q 3 the output of a negative edge-triggered flip-flop. These all have D as an input and CLK as the enable signal. Assume the latch and flip-flops are initially cleared.

c) Although we have not studied the JK flip-flop as illustrated below, it functions the same as the SR flip- flop except when the inputs are all high, which is normally indeterminate in an SR flip-flop. Fill in the two tables for the marked points in the circuit diagram for the given values of Q( t ).

d) What is the operation being performed by the above JK flip-flop when the inputs are high? What type of cell is this similar too when the inputs are high?

CLK

D

Q 2

Q 3

Q 1 Transparent latch output

Positive edge-triggered flip-flop

Negative edge-triggered flip-flop

S

C

R

Q

Q

S

C

R

Q

Q

Q

Q

Clk

J=

K=

a

b

c

d

a b c d

When Q( t ) = 0 Q( t +1)

a b c d

When Q( t ) = 1 Q( t +1)

4. FINITE STATE MACHINES (MAX MARK: 20)

a) Develop the state table for the following state diagram.

b) With the following input stream , apply it to the previous state machine and determine the output as well as the ending state at the end of the input stream.

c) Is the above state machine a Mealy machine or a Moore machine. Justify your answer!

S 0 S^1

S 2 S 3

Present State Input Next State Output

Input =

Output =

Ending State =

5. COUNTERS, SHIFT AND ROTATE REGISTERS (MAX MARK: 20)

a) Suppose you have a 4-bit bi-directional shift register that can perform both logical and two’s comple- ment arithmetic shifts. The contents of the shift register is initially 0011. When a serial shift-in value is required, it is set to 0. The table below indicates what type of shift operation is performed at each clock pulse. Complete the table with how the contents of the shift register change at each clock pulse.

b) Given the following 6-bit counter, develop a modulo-40 counter^ (divide by 40 counter) with minimal external logic, but, that still includes the CE, , , and inputs and the z outputs.

Clock

Pulse #

Shift Register Contents (^0 )

Shift Operation

ASL

LSL

LSL

ASR

ASR

LSR

ASR

ASL

CLEAR φ 1 φ 2

z 3 z 2 z 1 z 0

CLEAR

CE (^) 6-bit counter φ 1

φ 2 z 5 z 4

c) Below is a 4-bit bi-directional shift register where is a parallel input, is the

contents of the register, and are serial shift inputs for the left and right shifting, respectively, and controls the shifting properties of the register.

Given this 4-bit bi-directional shift register that can perform (^) logical shifts , design a (^) new 4-bit bi-direc- tional shift register that can perform both^ logic shifts and^ two’s complement arithmetic shifts using minimal external logic. Include one extra input,^ , that indicates whether to perform a logical shift ( ) or an arithmetic shift ( ).

d) Given an 8-bit ripple counter , how many flip-flop values will be complemented to get the next count value if the following are the current counter contents (MSB on the left, LSB on the right).

( x 3 , x 2 , x 1 , x 0 ) ( z 3 , z 2 , z 1 , z 0 ) x (^) l x (^) r ( c 1 , c 0 )

W

W =^ 0 W = 1

z 3 z 2 z 1 z 0

4-bit bidirectional

x r shift register

x l c

c

x 3 x 2 x 1 x 0

W

c

c

x 3 x 2 x 1 x 0

x r

x l

z 3 z 2 z 1 z 0

Current counter

contents

of complements

to next value