Anda di halaman 1dari 9

Question 1

M = 2110 =0101012
-M = 1010112
Q = 1110 = 0010112
010101
x 001011
111111101011
00000000000
0000010101
111101011
00010101
0000000

10000011100111 = 23110

Question 2

Dividend: 1410 = 011102 = 00000 011102


Divisor:

-410 = 1110002
A

00000 01110
00000 11100 Shift
+ 11100
11100
00000 11100
00001 11000 Shift
+ 11100
11101
00001 11000
00011 10000 Shift
+ 11100
11111
00011 10000
00111 00000 Shift
+ 11100
00011
00011 00001 Set Q0=1
00110 00010 Shift
+ 11100
00010
00010 00011

Quotient

111012

= -310

Remainder =

000102

= 210

This is so since the signs for the divisor and the dividend are different.

Question 3
i.

0.410 0.4 x 2 = 0.8


0.8 x 2 = 1.6
0.6 x 2 = 1.2
0.2 x 2 = 0.4
0.4 x 2 = 0.8
0.8 x 2 = 1.6
0.6 x 2 = 1.2
0.2 x 2 = 0.4
0.4 x 2 = 0.8

0.410 = 0.0110 011002


+
0

ii.

4 bits
0110

A = + 1/8 + 1/64 + 1/128 = 0.3984375


r = A-A = 0.4 - 0.3984375 = 3.90625 x 10-3
A
0.4
= 0.004

Question 4
r = 10

n=5

i.

rn N = 105 52040 = 47960

ii.

rn N = 105 48960 = 51040

7 bits
10 01100

Question 5
a)
Sign
1
-

Biased Exponent
10000110
134-127=710

Significant
11000000000000000000000
1.112

Biased Exponent
01111110
126-127=-110

Significant
10110010000000000000000
1.10110012

Biased Exponent
10000001
129 127= 2

Significant
00000000000000000000000
12

-1.112 x27 = - 1110 00002

Answer = -22410

b)
Sign
0
+
1.10110012 x 2-1 = 0.110110012

Answer = 0.8476562510

c)
Sign
0
+
1 x 22 = 1002

Answer = 4 10

Question 6
a) Immediate Address Mode
I.

Value of accumulator A after line 1.


10010 000 1111 0000
A # F0
Operand: F0.
Answer: F0 H

II.

Value of accumulator A after line 2.


10001 000 1111 0001
A A + #F1
A #F0 + #F1
A #1E1
Operand: F1.
Answer: 1E1 H

III.

Value of accumulator A after line 3.


10100 000 1111 0010
A A #F2
A #1E1 - #F2
A #EF
Operand: F2.
Answer: EF H

IV.

Instruction in binary format for MT series to store data in accumulator A to memory


location 500.
Opcode: 11010 = STORE AC A to memory.
Answer: 11010 001 1111 0100

b) Direct Address Mode


I.

Value of accumulator A after line 1.


10010 000 1111 0000
A F0
A #140
Operand: Content in memory location F0.
Answer: 140 H

II.

Value of accumulator A after line 2.


10001 000 1111 0001
A A + F1
A #140 + #142
A #282
Operand: Content in memory location F1.
Answer: 282 H

III.

Value of accumulator A after line 3.


10100 000 1111 0010
A A F2
A #282 - #200
A #82
Operand: Content in memory location F2.
Answer: 82 H

c) Indirect Address Mode


I.

Value of accumulator A after line 1.


10010 000 1111 0000
A (F0)
A 140
A #52
Operand: Contents of cell pointed to by content of F0.
Answer: 52 H

II.

Value of accumulator A after line 2.


10001 000 1111 0001
A A + (F1)
A #52 + 142
A #52 + #52
A #A4
Operand: Contents of cell pointed to by content of F1.
Answer: A4 H

III.

Value of accumulator A after line 3.


10100 000 1111 0010
A A - (F2)
A #A4 - 200
A #A4 - #20
A #84
Operand: Contents of cell pointed to by content of F2.
Answer: 84 H

Question 7
a) c = a + b
LOAD A
ADD
B
STORE C

AC A
AC AC + B
C AC

a = 22
b = 158
c=0

1 word = 4 bytes
For instruction, first byte is for opcode and the remaining 3 bytes specify the
corresponding address.
Opcode:

i.

STORE

is 1.

LOAD

is 2.

ADD

is 3 .

Address

Content

0x0000 ec00
0x0000 ec04
0x0000 ec08

0x0000 0016
0x0000 009e
0x0000 0000

0x0000 b128
0x0000 b12c
0x0000 b130

0x0200 ec00
0x0300 ec04
0x0100 ec08

ii.

Micro-instructions

Data

(PC) MAR
M
MBR
MBR IR
(a) AC

0x0000 b128
0x0200 ec00
0x0200 ec00
0x0000 0016

(PC) MAR
M
MBR
MBR IR
AC +(b) AC

0x0000 b12c
0x0300 ec04
0x0300 ec04
0x0000 00b4

(PC) MAR
M
MBR
MBR IR
AC (c)

0x0000 b130
0x0100 ec08
0x0100 ec08
0x0000 00b4

b)
i.

Address Selection Field: 2 bits

ii.

Address Field: 13 bits

iii.

Size of Control Memory: 213 = 8K bits