CST131 Test 1 2011_answer

December 26, 2017 | Author: Lattey Zihwan | Category: Computer Memory, Personal Computers, Office Equipment, Computer Hardware, Areas Of Computer Science
Share Embed Donate


Short Description

w...

Description

CST131 – Computer Organisation Academic Session 2011/2012 Semester 1 Test 1 : 3 November 2011, 11 am – 12 pm, 1 hours Name: _____________________________________________ Matric Number: _____________________ Answer all questions: 1. By using following format and opcodes, answer the following questions. Opcode 0

Address 7 8

List of Opcodes: 00001010 = load AC from memory 00100001 = store AC to memory 00000101 = add to AC from memory (i)

23

00000110 = subtract to AC from memory 00001011 = multiply to AC from memory

Show the process execution of the program below:

300: 109400 301: 059410 302: 069400 303: 119410

Initial values: PC = 0300 Memory: Address 9400 = 11110011 Address 9410 = 00000110

Answer: [30/100] 1. 109400 Pc = 301, IR = 109400, AC = (9400) = 11110011

[7

MARKS] 2. 059410 Pc = 302, IR = 059410, AC = 11110011 + (9410) 11110011 + 00000110 = 11111001 (-7) [ 7 MARKS] 3. 069400 Pc = 303, IR = 069400, AC = 11111001 – (9400) 11111001 – 11110011 = 00000110 (6) [ 7 MARKS] 4. 119410 Pc = 304, IR = 119410, AC = 00000110 x (9410) 00000110 x 00000110 = 00000000 00100100 (36) [9 MARKS]

(ii) Show the complete steps of arithmetic operation during the execution of instructions 059410, 069400, and 119410. Answer: [18/100] 1) 059410: 11110011 + 00000110 = 11111001 (-7) MARKS]

[5

2) 069400: 11111001 – 11110011 = 11111001 + 00001101 (00001100 + 1) = 00000110 (6) [ 5 MARKS] 3) 119410: 00000110 x 00000110 = 00000110 00000110 (0) 000000000000 (0-0) 11111111010 (1-0) 11111001 + 1 0000000000 (1-1) 000000110 (0-1) 00000101 + 1 00000000 (0-0) 000000100100 (36) [8 MARKS] 2. Answer all questions. (i)

Filling the table (show the complete steps of your answer at space provided below) Decimal

Twos compliment

Octal

Hexadecimal

102

01100110

146

66

-10

11110110

-12 / 766

F6

Answer [18/100]

102  128 64 32 16 8 4 2 1 0 1 1 00110

- 10  10 = 0000 1010 1111 0101 + 1 = 11110110 [ 3 MARKS]

[ 3 MARKS]

102  102/8 = 12 remainder 6 12/8 = 1 remainder 4 164 [ 3 MARKS]

10  10/8 = 1 remainder 2  12 [ 3 MARKS]

102  0110 0110 = 66 [ 3 MARKS]

-10  1111 0110 = F6 [ 3 MARKS]

(ii) Explain in brief the role of multiplexer in the figure below.

Answers:

[16/100]

-The final value of PC (which is 16 bits) is either value of C or IR or ALU. [ 2 MARKS] -The value which is assigned to S2 and S1 of the multiplexer will determine which value will be picked (C or IR or ALU). [ 2 MARKS] -In the case of S2 = 0 and S1 = 0, value C will be loaded into PC. [ 4 MARKS] -In the case of S2 =0 and S1 = 1, value IR will be loaded into PC and [ 4 MARKS] -in the case of S2 =1 and S1 = 0, value ALU will be loaded into PC. [ 4 MARKS] (iii)

Rewrite the “ - 100.11 x 2-10001 “ into 32 floating-point format.

Answer:

[18/100]

100.11 x 2-10001 = 1.0011 x 2-10001 + 1 + 1 = - 01111  - 15 + 127 =112  01110000 [ 5 MARKS] [ 5 MARKS] [ 5 MARKS] 1

01110000

00110000000000000000000 [ 3 MARKS]

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF