Computer Organization and Architecture: Number Systems and Interrupts

Verified

Added on  2025/04/30

|12
|967
|370
AI Summary
Desklib provides past papers and solved assignments for students. This solved assignment covers number systems and interrupts.
Document Page
Table of Contents
Question-1........................................................................................................................................2
a)..................................................................................................................................................2
b)..................................................................................................................................................2
c)..................................................................................................................................................4
Question 2........................................................................................................................................6
a)..................................................................................................................................................6
b)................................................................................................................................................10
Question 3......................................................................................................................................11
a)................................................................................................................................................11
b)................................................................................................................................................11
1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Question-1
a)
0x6A=(6A)16
= 6 * 161+A * 160
= 96 + 10 (In hexadecimal A= 10)
= 106
& (152)b =1 * b2+5 * b1 +2 * b0
= b2 + 5b + 2
Thus, equating the values:
b2 +5b+2=106
b2 + 5b - 104 = 0
b2 + 13b – 8b - 104 = 0
b (b + 13) – 8 (b + 13) = 0
(b + 13)(b - 8) = 0
b = 8, -13
But the value of b cannot be negative so,
b = 8
b)
Conversion of values:
i)
0x means it is in hexadecimal representation so we can write (BAD)16
So for converting in decimal:
(BAD)16 = B * 162 + A * 161 + D * 160
(BAD)16 = 11 * 162 + 10 * 161 + 13 * 160
(BAD)16 = 2816 + 160 + 13
(BAD)16 = 2989
Now we have to convert (2989)10 into 3-base
2
Document Page
For 3-base, 2989 will be divided by 3 for remainders:
2989/3 = 1 (remainder)
996/3 = 0
332/3 = 2
110/3 = 2
36/3 = 0
12/3 = 0
4/3 = 1
1/3 = 1
Putting remainders together reversely: 11002201
So (BAD)16 = (11002201)3
ii)
(321)7 in decimal form:
(321)7 = 3 * 72 + 2 * 71 + 1 * 70
(321)7 = 147 + 14 + 1
(321)7 = 162
For 2-base, 162 will be divided by 2 for remainders:
162/2 = 0 (remainder)
81/2 = 1
40/2 = 0
20/2 = 0
10/2 = 0
5/2 = 1
2/2 = 0
3
Document Page
Putting remainders together reversely: 10100010
So (321)7 = (10100010)2
iii)
(123)5 in decimal form:
(123)5 = 1 * 52 + 2 * 51 + 3 * 50
(123)5 = 25 + 10 + 3
(123)5 = 38
For octal representation, 38 will be divided by 8 for remainders:
38/8 = 6 (remainder)
4/8 = 4
Putting remainders together reversely: 46
So (123)5 = (46)8
iv)
(21.21)8 = 2 * 81 + 1 * 80 + 2 * 8-1 + 1 * 8-2
(21.21)8 = 16 + 1 + (2 * 1/8) + (1 * 1/64)
(21.21)8 = 17 + (2/8) + (1/64)
(21.21)8 = 17 + 0.25 + 0.0156
(21.21)8 = 17.2656
So (21.21)8 = (17.2656)10
c)
For 3-word bit size:
i)
There is always is sign bit value starting of every binary value
So, Highest value is: 111
Here 1 is sign bit, and decimal value of 111 = + (1 * 21 + 1 * 20) = +3
4
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
And Lowest value is: 011
Here 0 is sign bit which is negative in sign so decimal value of 011
011 = - (1 * 21 + 1 * 20) = -3
ii)
Highest value is +3 because two’s complement of value is: 101
Lowest value is -4 because two’s complement of value is: 100
iii)
Highest value is 111 and decimal: +3
Lowest value is 011 and decimal: -3
5
Document Page
Question 2
a)
Program for calculate fib(n):
ORG 000
INPUT USER /number input
SUBT TWO /result minus 2
PRINT, STORE P /AC stored after processing of P is done
CLEAR
ADD L1 /L1 plus AC
ADD L2 /L2 plus AC
STORE TOTAL /L1 plus L2
/now L1 = L2
LOAD L2 /Loading L2 in AC
STORE L1 /value storing in L1
LOAD TOTAL /AC value generate
STORE L2 /value storing in L2
LOAD P /P register load
SUBT ONE /P minus 1
SKIPCOND 000 / AC<0, so avoid cond 000
JUMP PRINT /starting loop and then print
6
Document Page
LOAD TOTAL /total AC value loaded
OUTPUT /show output
HALT /current progress paused
/progress started
USER, DEC 0
ONE, DEC 1
TWO, DEC 2
P, DEC 0
L1, DEC 0
L2, DEC 1
TOTAL, DEC 0
7
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
When the input: 7
The program output: 13
8
Document Page
When the input: 15
The program output: 610
9
Document Page
When the input: 20
The program output: 6765
b)
The maximum input value for the correct output is: 2147483647. After this, the Marie Simulator
will start showing incorrect output.
10
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Question 3
a)
In terms of a computer system, the interrupts are immediate signals which can occur in between
of some process which is running and needs prior attention or response. These signals can be
generated by any software or hardware or some event. If the generated interrupt is labeled as a
high priority, the current task will go in stop or in waiting condition. When the interrupt is
resolved then the running task can be executed again.
There are three types of interrupts in a system, Internal interrupts, External interrupts and
Software interrupts.
Basically, there are two approaches to deal with the interrupts generated within the running
process:
The first approach is to disable the interrupts when the interrupt is generated so the processor can
ignore the interrupt between the running process. When the running process will be completed
the interrupt will be enabled for execution.
The second approach is to set the priorities of the interruption So if the interrupt is of higher
priority only then the system will allow it for execution. The higher priority interruption will be
disabled.
b)
There are many benefits of the multiple bus architecture instead of a single bus architecture for a
computer system. Some of the biggest benefits are listed below:
- It provides expansion in slots of the motherboard which is not possible in a single bus
architecture.
- It is multi-core.
- Multiple bus architecture is improved in means of efficiency and speed.
- Multiple bus architecture provides compatibility with future system architecture and operations.
11
Document Page
12
chevron_up_icon
1 out of 12
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]