computer system architecture-0105

14
1 Question Paper Computer System Architecture (MC121) – January 2005 Section A : Basic Concepts (30 Marks) This section consists of questions with serial number 1 - 30. Answer all questions. Each question carries one mark. Maximum time for answering Section A is 30 Minutes. 1. The computer architecture having stored program is _____. (a) Harvard (b) Von-Neumann (c) Pascal (d) Ada (e) Cobol. < Answer > 2. The key technology used in IV generation computers is _______. (a) MSI (b) SSI (c) LSI &VLSI (d) Transistors (e) Vacuum Tubes. < Answer > 3. x and y are two digit BCD numbers. It is known that x + y is equal to 82(BCD) and x - y is equal to 04(BCD). The value of x is _______. (a) 01000011 (b) 00001010 (c) 00101011 (d) 00100111 (e) 00110010. < Answer > 4. The gray code of a given binary number 1001 is (a) 1110 (b) 0110 (c) 1101 (d) 1111 (e) 0000. < Answer > 5. When the addition of two +ve numbers results in a –ve value, then _______ flag will be set. (a) Over-flow (b) Carry (c) Parity (d) E (e) Sign. < Answer > 6. The digital circuit that generates the arithmetic sum of two binary numbers of any length is ________ . (a) Binary-Adder (b) Full-Adder (c) Half-Adder (d) Adder (e) OR-gate. < Answer > 7. Which of the following representation requires the least number of bits to store the number +255? (a) BCD (b) 2’s complement (c) 1’s complement (d) Unsigned binary (e) Signed binary. < Answer > 8. The number of select input lines in an 8-to-1 multiplexer is ________. (a) 1 (b) 8 (c) 2 (d) 4 (e) 3. < Answer > 9. If F= AB’ + C’D then F’= _______. (a) (A+B’)(C’+D) (b) (A’B)+(CD’) (c) (AB’)(CD’) (d) (A’+B)(C+D’) (e) (A’+B)+(C+D’). < Answer > 10. Serial to parallel data conversion is done using (a) Accumulator (b) Shift Register (c) Counter (d) CPU (e) Control Unit. < Answer > 11. What does D stand for in a D flip-flop? (a) Direct (b) Don’t care (c) Data (d) Device (e) Disk. < Answer > 12. Which of the following is not an advantage of asynchronous circuits? (a) Higher speed (b) Low power consumption (c) Smaller design effort (d) No need to provide clock generation circuitry (e) Simple functions. < Answer > 13. Carry in half-adder can be obtained using _______. (a) X-OR gate (b) AND gate (c) OR gate (d) X-NOR gate (e) Inverter. < Answer > 14. CACHE memory is implemented using ________. (a) Dynamic RAM (b) Static RAM (c) EA < Answer >

Upload: amitukumar

Post on 26-Oct-2014

48 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computer System Architecture-0105

1

Question Paper Computer System Architecture (MC121) – January 2005

Section A : Basic Concepts (30 Marks)

• This section consists of questions with serial number 1 - 30. • Answer all questions. • Each question carries one mark. • Maximum time for answering Section A is 30 Minutes.

1. The computer architecture having stored program is _____.

(a) Harvard (b) Von-Neumann (c) Pascal (d) Ada (e) Cobol.

< Answer >

2. The key technology used in IV generation computers is _______.

(a) MSI (b) SSI (c) LSI &VLSI (d) Transistors (e) Vacuum Tubes.

< Answer >

3. x and y are two digit BCD numbers. It is known that x + y is equal to 82(BCD) and x - y is equal to 04(BCD). The value of x is _______.

(a) 01000011 (b) 00001010 (c) 00101011 (d) 00100111 (e) 00110010.

< Answer >

4. The gray code of a given binary number 1001 is

(a) 1110 (b) 0110 (c) 1101 (d) 1111 (e) 0000.

< Answer >

5. When the addition of two +ve numbers results in a –ve value, then _______ flag will be set.

(a) Over-flow (b) Carry (c) Parity (d) E (e) Sign.

< Answer >

6. The digital circuit that generates the arithmetic sum of two binary numbers of any length is ________ .

(a) Binary-Adder (b) Full-Adder (c) Half-Adder (d) Adder (e) OR-gate.

< Answer >

7. Which of the following representation requires the least number of bits to store the number +255?

(a) BCD (b) 2’s complement (c) 1’s complement (d) Unsigned binary (e) Signed binary.

< Answer >

8. The number of select input lines in an 8-to-1 multiplexer is ________.

(a) 1 (b) 8 (c) 2 (d) 4 (e) 3.

< Answer >

9. If F= AB’ + C’D then F’= _______.

(a) (A+B’)(C’+D) (b) (A’B)+(CD’) (c) (AB’)(CD’)

(d) (A’+B)(C+D’) (e) (A’+B)+(C+D’).

< Answer >

10. Serial to parallel data conversion is done using

(a) Accumulator (b) Shift Register (c) Counter (d) CPU (e) Control Unit.

< Answer >

11. What does D stand for in a D flip-flop?

(a) Direct (b) Don’t care (c) Data (d) Device (e) Disk.

< Answer >

12. Which of the following is not an advantage of asynchronous circuits?

(a) Higher speed (b) Low power consumption (c) Smaller design effort (d) No need to provide clock generation circuitry (e) Simple functions.

< Answer >

13. Carry in half-adder can be obtained using _______.

(a) X-OR gate (b) AND gate (c) OR gate (d) X-NOR gate (e) Inverter.

< Answer >

14. CACHE memory is implemented using ________.

(a) Dynamic RAM (b) Static RAM (c) EA

< Answer >

Page 2: Computer System Architecture-0105

2

RAM (d) ED RAM (e) EP RAM.

15. CISC stands for ______________________.

(a) Control Instruction Set Completeness (b) Complex Instruction Set Conversion (c) Complex Instruction Set Computer (d) Control Instruction Set Conversion (e) Complex Instruction Set Control.

< Answer >

16. BUN instruction stands for_______

(a) Branch conditionally (b) Branch unconditionally (c) Boot unconditionally (d) Begin unconditionally (e) Branch and save return address.

< Answer >

17. Information transfer from one register to another is designated in symbolic form by means of _________.

(a) Control functions (b) OP-Code (c) Registers (d) Stack operation (e) Replacement operator.

< Answer >

18. DMA stands for__________________.

(a) Direct Memory Address (b) Direct Main Address (c) Direct Memory Access (d) Direct Main Access (e) Device Memory Access.

< Answer >

19. ______ is a symbol to denote a part of a register.

(a) { } (b) ( ) (c) < >

(d) (e)

< Answer >

20. ________ structure is useful in the evaluation of postfix arithmetic expression.

(a) Stack (b) Queue (c) Linked List (d) Graph (e) Tree.

< Answer >

21. When a large number of registers is included in the CPU, it is most efficient to connect them through a ______.

(a) ALU (b) Memory Register (c) STACK (d) QUEUE (e) Bus system.

< Answer >

22. The register that keeps track of the address of next instruction to be executed is ______ .

(a) AC (b) PC (c) IR (d) AR (e) DR.

< Answer >

23. The correspondence between the main memory blocks and those in the cache is specified by _________.

(a) Miss penalty (b) Replacement algorithms (c) Hit rate (d) Page fault (e) Mapping functions.

< Answer >

24. Which one of the following can be called as a peripheral?

(a) Control unit (b) Arithmetic unit (c) Speaker (d) Logic unit (e) Main memory.

< Answer >

25. The set of physical addresses is called

(a) Disk Space (b) Address Space (c) Pages (d) Frames (e) Location.

< Answer >

26. The device that is allowed to initiate data transfer on the bus is called ___________.

(a) Bus master (b) Bus arbitration (c) Bus cycle (d) Bus request (e) Parallel bus.

< Answer >

27. The DMA transfer technique where transfer of one word data at a time is called ______.

(a) Cycle stealing (b) Memory stealing (c) Hand-shaking (d) Inter-leaving (e) Bus stealing.

< Answer >

Page 3: Computer System Architecture-0105

3

28. ______ interface is used to connect the processor to I/O devices that require transmission of data one bit at a time.

(a) Parallel (b) Serial (c) Output (d) Input (e) Bus.

< Answer >

29. In based addressing mode, instruction contains ________.

(a) Base address (b) Displacement (c) Absolute address (d) Relative address (e) Indirect address.

< Answer >

30. A hand-shake based protocol for data transfer is an example of ______ type of data transfer.

(a) Synchronous (b) Asynchronous (c) Serial (d) Parallel (e) Indirect.

< Answer >

END OF SECTION A

Page 4: Computer System Architecture-0105

4

Section B : Problems (50 Marks)

• This section consists of questions with serial number 1 – 5. • Answer all questions. • Marks are indicated against each question. • Detailed workings should form part of your answer. • Do not spend more than 110 - 120 minutes on Section B.

1. a. Convert the following pairs of decimal numbers to 5 bit 2’s complement binary numbers and add them. State whether or not overflow occurs in each case.

i. 5 and 10

ii. 7 and 13

iii. -14 and 11

iv. -5 and -8

v. 13 and –3.

b. Represent the decimal values -10, 26, -2, 51 and -43 as signed 7 bit numbers in the following formats.

i. Sign and magnitude (i.e. Binary format)

ii. 9’s complement.

(5 + 5 = 10 marks) < Answer >

2. a. Simplify the following with the help of a K-Map.

F (a, b, c, d) = ∑ (3, 5, 6, 7) + d (10, 11, 12, 13, 14, 15) in SOP form.

b. Explain SR Latch with the help of a Logic Diagram

(5 + 5 = 10 marks) < Answer >

3. a. Convert the following numerical arithmetic expression into reverse polish notation and show the stack operations for evaluating the numerical result.

(3 + 4) * (10 * (2 + 6) + 8)

b. An instruction is started at location 300 with its address field at location 301. The address field has the value 400. A processor register R1 contains the number 200. Evaluate the effective address if the addressing mode of the instruction is

i. Direct. ii. Immediate. iii. Relative. iv. Index with R1 as index register.

(6 + 4 = 10 marks) < Answer >

4. Explain the Instruction Cycle with the help of a flow chart.

(10 marks) < Answer >

5. Consider a state machine with 4 states S0, S1, S2 and S3. The machine has one input labeled X and output labeled Y. S0 is the initial state. The behavior of the state machine is shown below.

Present State Input X Next State Output Y S0 0 S0 0 S0 1 S1 0 S1 0 S1 0 S1 1 S2 0 S2 0 S2 0 S2 1 S3 0 S3 0 S3 0 S3 1 S0 1

Page 5: Computer System Architecture-0105

5

Design the above state machine using JK flip-flops. Assume synchronous operation.

(10 marks) < Answer >

END OF SECTION B

Section C : Applied Theory (20 Marks)

• This section consists of questions with serial number 6 - 7. • Answer all questions. • Marks are indicated against each question. • Do not spend more than 25 -30 minutes on section C.

6. Explain Virtual Memory with address mapping using pages.

(10 marks) < Answer >

7. Explain the DMA transfer with help of a diagram.

(10 marks) < Answer >

END OF SECTION C

END OF QUESTION PAPER

Suggested Answers Computer System Architecture (MC121) – January 2005

Section A : Basic Concepts 1. Answer : (b)

Reason : The first computer architecture having stored program is Von-Neumann

< TOP >

2. Answer : (c) Reason : Large-scale integrated and very large-scale integrated circuits are used in the IV

generation.

< TOP >

3. Answer : (a) Reason : The x value is 01000011

< TOP >

4. Answer : (c) Reason : The gray code of 1001 is 1101

< TOP >

5. Answer : (a) Reason : Over –flow flag will be set .

< TOP >

6. Answer : (a) Reason : The binary adder is used to add binary numbers of any length

< TOP >

7. Answer : (d) Reason : Unsigned binary representation occupies less space to store the number +255.

< TOP >

8. Answer : (e) Reason : If 2n data inputs lines are connected to a MUX then there will be n Selection lines. For 8-to -1 MUX 23 input lines and 3 selection lines are possible

< TOP >

9. Answer : (d) < TOP >

Page 6: Computer System Architecture-0105

6

Reason : The complement of AB’ +C’D is ( A’+B ) ( C+D’ )

10. Answer : (b) Reason : Shift registers are used for serial to parallel data. Conversion.

< TOP >

11. Answer : (c) Reason : In a D flip-flop D stands Data..

< TOP >

12. Answer : (c) Reason : Smaller Design effort is not an advantage of asynchronous circuits.

< TOP >

13. Answer : (b) Reason : AND gate is used to obtain the carry in the half-adder circuit.

< TOP >

14. Answer : (a) Reason : Using Dynamic RAM CACHE memory is implemented.

< TOP >

15. Answer : (c) Reason : CISC stands for Complex Instruction Set Computer

< TOP >

16. Answer : (b) Reason : BUN means Branch Unconditionally.)

< TOP >

17. Answer : (e) Reason : A replacement operator consist of the information transfer from one register to another is

designated in symbolic form

< TOP >

18. Answer : (c) Reason : DMA stands for Direct Memory Access

< TOP >

19. Answer : (b) Reason : The part of the register is denoted with ()

< TOP >

20. Answer : (a) Reason : Data structure stack is used in evaluating the post-fix expression.

< TOP >

21. Answer : (a) Reason : All registers in a CPU are connected through ALU..

< TOP >

22. Answer : (b) Reason : Program Counter contains the address of the next instruction to be executed..

< TOP >

23. Answer : (e) Reason : The corresponding between the main memory blocks and those in the cache is specified by

a mapping function, because the basic characteristic of cache memory is fast access time. Therefore, very little or no time must be wasted when searching for words in the cache.

< TOP >

24. Answer : (c) Reason : Speakers can be called as a peripheral as all others are part of the system.

< TOP >

25. Answer : (b) Reason : The collection of address spaces in a physical memory is called address space.

< TOP >

26. Answer : (a) Reason : The Bus master is allowed to initiate data transfer on the bus.

< TOP >

27. Answer : (a) Reason : Transfer of one word data at a time using DMA transfer technique is called Cycle Stealing.

< TOP >

28. Answer : (b) Reason : Serial interface transfers one bit at a time, whereas others can handle more than one bit.

< TOP >

29. Answer : (b) Reason : In a based addressing mode the displacement is the address field.

< TOP >

30. Answer : (b) Reason : Asynchronous data transfer

< TOP >

Page 7: Computer System Architecture-0105

7

Section B : Problems MC121

1. a.

1) Number Binary rep. 1’s complement 2’s complement

5 00101 11010 11011

10 01010 10101 10110

Add 1 10001

No over flows occurs

2) 7 00111 11000 11001

13 01101 10010 10011

Add 1 01100

Overflow occurs

3) –14 01110 10001 10010

11 01011 10100 10101

Add 1 00111

Overflow occurs

4) –5 00101 11010 11101

–8 01000 10111 11000

Add 1 00111

No overflow occurs

5) 13 01101 10010 10011

–3 00011 11100 11101

Add 1 10000

No overflow occurs

b.

i) –10 11001010

26 0011010

–2 1000010

51 0110011

–43 1101011

Page 8: Computer System Architecture-0105

8

< TOP >

2. a. Simplify the following with the help of a K-Map. F(a,b,c,d)=∑(3,5,6,7)+d(10,11,12,13,14,15) in SOP form.

00 01 11 10

00 0 1 3 2

01 4 5 7 6

11 12 13 15 14

10 8 9 11 10

00 01 11 10

00 0 0 1 0

01 0 1 1 1

11 x x x x

10 0 0 x x

A’B’CD+A’BCD+ABCD+AB’CD=A’CD+ACD=CD • A’BC’D+A’BCD+ABC’D+ABCD=A’BD+ABD=BD • A’BCD+A’BCD’+ABCD+ABCD’=A’BC+ABC=BC F=CD+BD+BC in Sum of Products form ( 3marks)

b. Explain SR Latch with the help of a Logic Diagram? SR Latch

S R Q Q’

1 0 1 0

0 0 1 0

0 1 0 1

0 0 0 1

1 1 0 0 Invalid

< TOP >

Page 9: Computer System Architecture-0105

9

3. a. Convert the following numerical arithmetic expression into reverse polish notation and show the stack operations for evaluating the numerical result. ( 3 + 4 ) * ( 10 * ( 2 + 6 ) + 8 ) Let X=(3+4)*(10*(2+6)+8) =(3+4)*(10 26+*+8) =(3+4)*(10 26+*8+) =(3 4+)*(10 26 +*8+) =3 4 + 10 26 +*8 + * is the reverse polish notation

b. An instruction is started at location 300 with its address field at location 301. The address field has the value 400. A processor

register R1 contains the number 200. Evaluate the effective address if the addressing mode of the instruction is i) Direct. ii) Immediate. iii) Relative. iv) Index with R1 as index register

1) Direct Addressing mode:

Effective address = Address field of the instruction =400 2) Immediate Addressing Mode: Effective address can’t be defined for an immediate instruction. 3) Relative addressing Mode:

Effective address = Contents of PC + Address field of the instruction. We know that PC is pointing to next instruction i.e. PC=302. Thus effective address = 400+302=702

4) Index with R1 as Index register: Effective address= Contents of index register + address field. Here R1 is index register = 200 + 400 =600

< TOP >

Page 10: Computer System Architecture-0105

10

4.

< TOP >

5.

Present State Next State

A B X A B JA KA JB KB Output Y

0 0 0 0 0 0 X 0 X 0

0 0 1 0 1 0 X 1 X 0

0 1 0 0 1 0 X X 0 0

0 1 1 1 0 1 X X 1 0

1 0 0 1 0 X 0 0 X 0

1 0 1 1 1 X 0 1 X 0

1 1 0 1 1 X 0 X 0 0

1 1 1 0 0 X 1 X 1 1

Page 11: Computer System Architecture-0105

11

1 1 1 10 0 0 0

0 0 0 0

0 0 0 0

1 1 1 1

1

1

1

1

1

1

X

X

X

X

X X

X

XX

X

X

X

X X

1

J =BXA

K =BXA

J =XB

K =XB

1 1 1

0 0 0 0

1 1 1 1

1 1 1 1

0 0 0 0

X

AB

X

AB

X

AB

X

AB

< TOP >

Section C: Applied Theory 6. Give the programmer the illusion that the system has a very large memory, even though the computer actually has a relatively small

main memory. Address Space(Logical) and Memory Space(Physical)

Address Mapping Memory Mapping Table Virtual Address (20 bits) -> Physical Address (15 bits)

Page 12: Computer System Architecture-0105

12

Address Space and Memory Space are each divided into fixed size group of words called blocks or pages 1K words group

Organization of memory Mapping Table in a paged system

ASSOCIATIVE MEMORY PAGE TABLE Assume that Number of Blocks in memory = m Number of Pages in Virtual Address Space = n Page Table - Straight forward design -> n entry table in memory Inefficient storage space utilization <- n-m entries of the table is empty More efficient method is m-entry Page Table Page Table made of an Associative Memory m words; (Page Number:Block Number)

Page 13: Computer System Architecture-0105

13

Page Fault Page number cannot be found in the Page Table

< TOP > 7. Block of data transfer from high speed devices ,Drum, Disk, Tape

* DMA controller - Interface which allows I/O transfer directly between Memory and Device Freeing CPU for other tasks * CPU initializes DMA Controller by sending memory address and the block size(number of words)

DMA I/0 OPERATION Starting an I/0 - CPU executes instruction to

Load Memory Address Register Load Word Counter Load Function(Read or Write) to be performed Issue a GO command

Upon receiving a GO Command DMA performs I/O operation as follows independently from CPU Input

[1] Input Device <- R (Read control signal) [2] Buffer(DMA Controller) <- Input Byte; and

Page 14: Computer System Architecture-0105

14

assembles the byte into a word until word is full [4] M <- memory address, W(Write control signal) [5] Address Reg <- Address Reg +1; WC(Word Counter) <- WC - 1 [6] If WC = 0, then Interrupt to acknowledge done, else go to [1]

Output [1] M <- M Address, R M Address R <- M Address R + 1, WC <- WC - 1 [2] Disassemble the word [3] Buffer <- One byte; Output Device <- W, for all disassembled bytes [4] If WC = 0, then Interrupt to acknowledge done, else go to [1]

CYCLE STEALING While DMA I/O takes place, CPU is also executing instructions

DMA Controller and CPU both access Memory -> Memory Access Conflict

Memory Bus Controller - Coordinating the activities of all devices requesting memory access - Priority System

Memory accesses by CPU and DMA Controller are interwoven, with the top priority given to DMA Controller -> Cycle Stealing

Cycle Steal - CPU is usually much faster than I/O(DMA), thus CPU uses the most of the memory cycles - DMA Controller steals the memory cycles fromCPU - For those stolen cycles, CPU remains idle - For those slow CPU, DMA Controller may steal most of the memory cycles which may cause CPU remain idle long time

< TOP >

< TOP OF THE DOCUMENT >