# 代写CIT 593、辅导C++设计编程

- 首页 >> Database作业CIT 593: Introduction to Computer Systems

Instructions: Complete all problems in the space provided, if you need more space you may add it in this Word document. You will upload a PDF of this exam into Gradescope; if your work isn’t clear, you are less likely to receive partial credit.

Specifics on what can be used during the exam and how to submit are available in the instructions tab in Coursera.

Part I – Short Answer Questions {20 points} (Provide brief answers to the following questions)

1) If there are 50 students in our class and every student is assigned a unique bit pattern, what is the minimum number of bits required to do this?

2^6 + 2^5 +2^4 > 50

6 bits

2) What is the greatest magnitude negative number one can represent in a 5-bit 2’s compliment code? Write your result in binary and decimal. (Magnitude: -3 has a greater magnitude than -2)

-16 in decimal

10000 in binary

3) Convert (a) and (b) to 8-bit 2’s complement binary numbers. Consider (b) as a 2C value.

Consider (c) and (d) as 8-bit 2’s complement binary numbers and convert them to decimal:

Number to Convert Converted number

a) -110ten 10010010

b) Dhex 00001101

c) 010010binary 18 ten

d) 10110binary -10 ten

4) The following are 2’s complement binary numbers. Perform the following operations & indicate if any of the operations generate overflow.

2C Binary Answer Overflow? (Yes or No)

a) 1011 + 11 -6 NO

b) 01101111+010000 127 NO

c) 10001 – 011 -18 YES

d) 01101 + 011 16 YES

5) If a CMOS circuits outputs a 1, what must be true (select all that apply by underlining them):

A pathway exists in the circuit between the output and power source

All NMOS transistors must be off

All PMOS transistors must be on

The PDN must be on

All of the above

None of the above

6) What is the purpose of an ISA?

ISA helps create program in human language and translates to machine language; and bridges the gap between the human and machine.

7) What is the address space, addressability, and total capacity of the LC4s memory?

Address space: “number of drawers”, meaning the total number of memory space

Addressability: “number of bits in one drawer” meaning the total number of bits in one memory space

Total capacity: total number of bits can hold in all memory space

8) In the LC4’s ISA, why don’t the “compare” instructions set regFile.WE=1 ?

Compare uses NEP register, and the ALU was not meant to be used and, thus the regfile was not meant to be written.

9) What is the difference between an “immediate” instruction and non-immediate instruction? In each case, where is the data coming from?

Immediate instruction saves the step from reading the Rt and directly adding number inside register memory

10) Why is the OPCODE for the MOD instruction different from the rest of the arithmetic instructions?

Relates to shifting bits as the remainder of the division

Part II – Long Form Questions:

1) {20 points TOTAL} Answer the questions below using following logic circuit shown here (note: each inverter has a 1ns propagation delay):

a) {7.5 points} Complete the timing diagram for outputs A, B, and C. Assume each dotted line is spaced 1ns apart.

You can use “Draw” or “Insert->Shapes->Lines” in Word, or you can make and complete the timing diagram in CircuitLab.

b) {7.5 points} Implement this circuit using CMOS transistors

c) {1.5 points} Is this circuit combinational or sequential?

sequential

d) {1.5 points} Looking at the output line: C, what is the purpose of this circuit?

Clock

e) {1 points} Given your observation of output line C, what is the frequency of this circuit?

1/2ns =500 MHz

f) {1 points} What could you do to this circuit to increase the frequency?

Decrease NOT gates.

2) {10 points TOTAL}:

a) {5 points} Create a truth table for a combinational logic component that has (3) 1-bit inputs and (1) 1-bit output. The output is 1 if the “number of 1s” at the input is odd. The output is 0 if the “number of 1s” at the input is even. As an example, 3-bit input: 111 would produce a 1 at the output as it has 3 ones. Note: 000 would produce a 0 at the output.

b) {5 points} Implement the truth table from part (a) as a PLA:

c) {1.5 e.c.} Implement this truth table using the smallest number of logic gates:

3) {15 points} The table below shows the contents of a region of User Program Memory in PennSim. First convert the machine instructions you see here to an equivalent sequence of assembly instructions so you can read them. Write your answers directly in the tables below. After you have done this, show what would happen when the program is executed by filling in the second table which shows the state of all of the registers at the start of each instruction cycle. For the register values R0-R7 you only need to fill in the value of the register that has changed from the previous cycle, if any. Keep the PSR in HEX. For R0-R7 you may use either decimal or HEX (but indicate which is which with a leading # or x). Hint: start by looking at the four bit opcode – be careful how you break up the 16 bit fields, one bit can make a big difference.