Docsity

Introduction to Computer Engineering – Midterm | ECE 2030, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE2030: Intro to Computer Engineering
Spring 2002
Midterm 2
Feb 28, 2002
Prof. Sung Kyu Lim’s Section (Section H)
Guidelines:
1. Read the questions carefully and follow the instructions when answering them.
2. Show all your work to receive full credit.
3. State any assumptions you make on your solution.
4. When using a functional building block such as a decoder or multiplexer, mark
I/O signals clearly.
5. Complemented inputs are available for all problems in this exam.
6. The basic logic gates you are allowed to use are AND, NAND, OR, NOR, XOR,
XNOR, INV, and transmission gates.
7. Time: 3:05 - 4:25pm (80 min)
8. Total number of pages in this exam: 9
Name: ______________________________
Prob 1 (15pts)
Prob 2 (35pts)
Prob 3 (15pts)
Prob 4 (35pts)
TOTAL (100pts)
School of Electrical and Computer Engineering
Georgia Institute of Technology
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Introduction to Computer Engineering – Midterm | ECE 2030 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

ECE2030: Intro to Computer Engineering

Spring 2002

Midterm 2

Feb 28, 2002

Prof. Sung Kyu Lim’s Section (Section H)

Guidelines:

  1. Read the questions carefully and follow the instructions when answering them.
  2. Show all your work to receive full credit.
  3. State any assumptions you make on your solution.
  4. When using a functional building block such as a decoder or multiplexer, mark I/O signals clearly.
  5. Complemented inputs are available for all problems in this exam.
  6. The basic logic gates you are allowed to use are AND, NAND, OR, NOR, XOR, XNOR, INV, and transmission gates.
  7. Time: 3:05 - 4:25pm (80 min)
  8. Total number of pages in this exam: 9

Name: ______________________________

Prob 1 (15pts)

Prob 2 (35pts)

Prob 3 (15pts)

Prob 4 (35pts)

TOTAL (100pts)

School of Electrical and Computer Engineering

Georgia Institute of Technology

  1. (15pts) Perform the following 8-bit binary addition using the specified signed number representation method. Fill in the blanks with your final answers, and show all intermediate steps below including any corrections you made. Do not change the order of operands.

a) (6pts) (-37) + (+58) in signed magnitude

1 0 1 0 0 1 0 1 (-37)

  • 0 0 1 1 1 0 1 0 (+58) ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

0 0 0 1 0 1 0 1 (+21)

37 in binary = 00100101, 58 in binary = 00111010

00100101 (37)

  • 00111010 (58)

11101011 (end borrow, so correction needed) 00010101 (2’s complement correction) 00010101 (get the opposite sign of 1 st^ operand) 

b) (6pts) (-58) + (-37) in 1’s complement (do not use 2’s complement)

1 1 0 0 0 1 0 1 (-58)

  • 1 1 0 1 1 0 1 0 (-37) ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

1 0 1 0 0 0 0 0 (-95)

110011111 (end carry, so correction needed) 10011111

  • 1 (add end carry)

10100000 (-95)

  1. (35pts) Consider the following 2-bit magnitude comparator.

a) (5pts) build the corresponding truth table.

A 1 A 0 B 1 B 0 A > B A = B A < B 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 0

b) (15pts) design the comparator using 3x8 decoders and logic gates.

A > B A = B A < B

A 1 A 0 B 1 B 0

2-bit comparator

B 0

B 1

A 0

E 0 1 2 3 4 5 6 7

A 1 E

B 0

B 1

A 0

A 1

A = B

A < B

A > B

c) (15pts) design the comparator using three 4x1 multiplexers and logic gates.

B 0

3 S 1 S 0

A 1 A 0

A > B

3 S 1 S 0

A 1 A 0

A = B

3 S 1 S 0

A 1 A 0

A < B

B 1

B 0

B 1

B 0

B 1

B 1

B 1

B 0

B 1

B 0

B 1

  1. (35pts) A ticket for “Ocean’s Eleven” at Phipps Plaza AMC costs 20 cents, and you are hired to design a controller for a ticket dispenser. The machine accepts nickels and dimes, and does not give change. Bad coins are rejected, and a coin that places the total over 20 cents is also rejected. When a coin is deposited that will bring the total to exactly 20 cents, a ticket is immediately dispensed. The 2-bit input signals to the controller are generated by the following 4-to-2 encoder that indicates which coin is received.

The controller produces two output signals: T to dispense a ticket, and R to reject the inserted coin.

a) (9pts) draw the corresponding state diagram. You should have 4 states only, and your arc label should follow BA / TR format.

S 0 S 1 S 2 S 3

A

B

no coin

nickel

dime bad coin

b) (9pts) build the corresponding state table. Name your state bits P and Q for MSB and LSB, respectively.

Pres In Next Out P Q B A P Q T R 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1

c) (9pts) derive the simplified equations for D flip-flops and outputs using K-maps. Use BA for rows and PQ for columns.

R BA BPQ

T BAPQ BAPQ

Q BQ AQ BAQ

P BAP BPQ APQ BAP BAPQ

PQ

BA

K-map for Q

PQ

BA

K-map for P

PQ

BA

K-map for R

PQ

BA

K-map for T