ITC544 Assessment 2: Computers, Data, and Programming Assignment
VerifiedAdded on 2025/04/30
|13
|1116
|235
AI Summary
Desklib provides past papers and solved assignments for students. This solved assignment covers various computer science topics.

ITC544 - IT FUNDAMENTALS
ASSESSMENT 2 - ASSIGNMENT 1:
COMPUTERS, DATA AND PROGRAMMING
Student Name:
Student ID:
ASSESSMENT 2 - ASSIGNMENT 1:
COMPUTERS, DATA AND PROGRAMMING
Student Name:
Student ID:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Table of Contents
Question 1..................................................................................................................................2
a).............................................................................................................................................2
b)............................................................................................................................................3
i).........................................................................................................................................3
ii)........................................................................................................................................4
iii).......................................................................................................................................5
iv).......................................................................................................................................5
c).............................................................................................................................................6
i).........................................................................................................................................6
ii)........................................................................................................................................6
iii).......................................................................................................................................6
Question 2..................................................................................................................................7
a).............................................................................................................................................7
b)..........................................................................................................................................11
Question 3................................................................................................................................12
a)...........................................................................................................................................12
b)..........................................................................................................................................13
Question 1..................................................................................................................................2
a).............................................................................................................................................2
b)............................................................................................................................................3
i).........................................................................................................................................3
ii)........................................................................................................................................4
iii).......................................................................................................................................5
iv).......................................................................................................................................5
c).............................................................................................................................................6
i).........................................................................................................................................6
ii)........................................................................................................................................6
iii).......................................................................................................................................6
Question 2..................................................................................................................................7
a).............................................................................................................................................7
b)..........................................................................................................................................11
Question 3................................................................................................................................12
a)...........................................................................................................................................12
b)..........................................................................................................................................13

Question 1
a)
Firstly, converting LHS into its equivalent decimal value.
0x6A = 6 * 161 + A * 160 = 106 1
106 is the decimal equivalent so, comparing LHS with RHS we get,
A = 10
Now, (152) b conversion into its equivalent expression.
(152) b = 1 * b² + 5 * b¹ + 2 * b⁰
(152) b = b² + 5b + 2 2
Equating 1 & 2, we get
b² + 5b + 2 = 106
b² + 5b - 104 = 0
b² + 13b - 8b - 104 = 0
b (b+13) - 8(b + 13) = 0
(b-8)(b+13) = 0
b = 8 or b = -13
Now, base cannot be negative so,
b = 8 is the final answer.
a)
Firstly, converting LHS into its equivalent decimal value.
0x6A = 6 * 161 + A * 160 = 106 1
106 is the decimal equivalent so, comparing LHS with RHS we get,
A = 10
Now, (152) b conversion into its equivalent expression.
(152) b = 1 * b² + 5 * b¹ + 2 * b⁰
(152) b = b² + 5b + 2 2
Equating 1 & 2, we get
b² + 5b + 2 = 106
b² + 5b - 104 = 0
b² + 13b - 8b - 104 = 0
b (b+13) - 8(b + 13) = 0
(b-8)(b+13) = 0
b = 8 or b = -13
Now, base cannot be negative so,
b = 8 is the final answer.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

b)
i)
0xBAD into 3-base representation
Hexadecimal to Decimal conversion
o 0xBAD is a hexadecimal number.
o Converting BAD into its equivalent decimal form.
o (BAD)16 = B * 162 + A * 161 + D * 160
o (BAD)16 = 11 * 162 + 10 * 161 + 13 * 160
o (BAD)16 = (2989)10 1
Decimal to 3-base conversion
o Firstly, dividing equation 1 result with 3 for the 3-base representation.
Dividend / 3 Divisor Remainder
2989/3 996 1
996 /3 332 0
332 / 3 110 2
110 / 3 36 2
36 / 3 12 0
12/3 4 0
4/3 1 1
1/3 0 1
o Secondly, taking the remainder of the above-equated value.
o Now, taking the reverse order of the remainder.
o 11002201 is the 3-base representation of 0xBAD
i)
0xBAD into 3-base representation
Hexadecimal to Decimal conversion
o 0xBAD is a hexadecimal number.
o Converting BAD into its equivalent decimal form.
o (BAD)16 = B * 162 + A * 161 + D * 160
o (BAD)16 = 11 * 162 + 10 * 161 + 13 * 160
o (BAD)16 = (2989)10 1
Decimal to 3-base conversion
o Firstly, dividing equation 1 result with 3 for the 3-base representation.
Dividend / 3 Divisor Remainder
2989/3 996 1
996 /3 332 0
332 / 3 110 2
110 / 3 36 2
36 / 3 12 0
12/3 4 0
4/3 1 1
1/3 0 1
o Secondly, taking the remainder of the above-equated value.
o Now, taking the reverse order of the remainder.
o 11002201 is the 3-base representation of 0xBAD
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

ii)
3217 into 2-base (binary) representation
3217 is a decimal number
Converting it to its equivalent binary form
Dividing 3217 with 2 to get the binary value
Dividend / 2 Divisor Remainder
3217/2 1608 1
1608/2 804 0
804/2 402 0
402/2 201 0
201/2 100 1
100/2 50 0
50/2 25 0
25/2 12 1
12/2 6 0
6/2 3 0
3/2 1 1
1/2 1 1
Now, taking the remainder and then writing it in reverse order starting from the
bottom.
We get 110010010001 which is the binary equivalent value of 3217.
3217 into 2-base (binary) representation
3217 is a decimal number
Converting it to its equivalent binary form
Dividing 3217 with 2 to get the binary value
Dividend / 2 Divisor Remainder
3217/2 1608 1
1608/2 804 0
804/2 402 0
402/2 201 0
201/2 100 1
100/2 50 0
50/2 25 0
25/2 12 1
12/2 6 0
6/2 3 0
3/2 1 1
1/2 1 1
Now, taking the remainder and then writing it in reverse order starting from the
bottom.
We get 110010010001 which is the binary equivalent value of 3217.

iii)
1235 into an octal representation
1235 is a decimal number
Converting it to its equivalent octal form
Dividing 1235 with 8 to get octal value
Dividend / 8 Divisor Remainder
1235/8 154 3
154/8 19 2
19/8 2 3
2/8 2 2
Now, taking the remainder and then writing it in reverse order starting from the
bottom.
We get 2323 which is the octal equivalent value of 1235.
iv)
21.218 into a decimal representation
The decimal representation of 21.218 is 21218/1000
1235 into an octal representation
1235 is a decimal number
Converting it to its equivalent octal form
Dividing 1235 with 8 to get octal value
Dividend / 8 Divisor Remainder
1235/8 154 3
154/8 19 2
19/8 2 3
2/8 2 2
Now, taking the remainder and then writing it in reverse order starting from the
bottom.
We get 2323 which is the octal equivalent value of 1235.
iv)
21.218 into a decimal representation
The decimal representation of 21.218 is 21218/1000
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

c)
i)
Highest = 23-1 -1 = 3
Lowest = - (23-1 -1) = -3
ii)
Highest = 23-1 -1 = 3
Lowest = -23-1 = -4
iii)
Highest = 23-1 -1 = 3
Lowest = - (23-1 -1) = -3
i)
Highest = 23-1 -1 = 3
Lowest = - (23-1 -1) = -3
ii)
Highest = 23-1 -1 = 3
Lowest = -23-1 = -4
iii)
Highest = 23-1 -1 = 3
Lowest = - (23-1 -1) = -3
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Question 2
a)
Code for the Fibonacci series is written below:
ORG 000
INPUT USER /user asked for input
SUBT TWO /subt 2 from result
PRINT, STORE Q /while Q is process storing AC in Q
CLEAR
ADD Q1 /AC + Q1
ADD Q2 /AC+ Q2
STORE TOTAL /Q1 + Q2 = result
/now Q1 = Q2
LOAD Q2 /loading Q2 in AC
STORE Q1 /value stored in Q1
LOAD TOTAL /value loaded in AC
STORE Q2 /N2 in AC
LOAD Q /Q load in register
SUBT ONE /Q-1
SKIPCOND 000 / AC<0, avoid cond 000
JUMP PRINT /starting Loop & printing
LOAD TOTAL /total value loaded in AC
OUTPUT /displaying output
HALT /pause
/Progression initialization
a)
Code for the Fibonacci series is written below:
ORG 000
INPUT USER /user asked for input
SUBT TWO /subt 2 from result
PRINT, STORE Q /while Q is process storing AC in Q
CLEAR
ADD Q1 /AC + Q1
ADD Q2 /AC+ Q2
STORE TOTAL /Q1 + Q2 = result
/now Q1 = Q2
LOAD Q2 /loading Q2 in AC
STORE Q1 /value stored in Q1
LOAD TOTAL /value loaded in AC
STORE Q2 /N2 in AC
LOAD Q /Q load in register
SUBT ONE /Q-1
SKIPCOND 000 / AC<0, avoid cond 000
JUMP PRINT /starting Loop & printing
LOAD TOTAL /total value loaded in AC
OUTPUT /displaying output
HALT /pause
/Progression initialization

USER, DEC 0
ONE, DEC 1
TWO, DEC 2
Q, DEC 0
Q1, DEC 0
Q2, DEC 1
TOTAL, DEC 0
ONE, DEC 1
TWO, DEC 2
Q, DEC 0
Q1, DEC 0
Q2, DEC 1
TOTAL, DEC 0
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

b)
The program does not produce adequate results for certain values of n as it should be. The
threshold of the integers traversed by the system is the reason for this anomaly. There is a
value limit which can be collected by type of data.
In the simulator, the ultimate value is 2147483647 for which value of n is 24
There will be an incorrect output after that value.
The program does not produce adequate results for certain values of n as it should be. The
threshold of the integers traversed by the system is the reason for this anomaly. There is a
value limit which can be collected by type of data.
In the simulator, the ultimate value is 2147483647 for which value of n is 24
There will be an incorrect output after that value.

Question 3
a)
An interrupt is a signal with the utmost priority of the hardware and software which should
immediately be processed by a processor. Whenever an interrupt occurs, the controller
completes the execution of the current instruction and starts the execution of an Interrupt
Handler or Interrupt Service Routine.
Types of Interrupts
Software - An interruption to software is either caused by an extraordinary condition or by a
special instruction set, which causes the processor to interrupt.
Hardware - A digital alert signal sent from external devices to the processor such as a disk
console or external peripheral is a hardware interrupt.
Approaches to deal with multiple interrupts
1. The first is to deactivate interruptions while processing an interrupt. A deactivated
interrupt basically means that this interrupt request signal can be ignored by the
processor. If a break occurs throughout this time, it is usually ongoing and tested by
the processor once the interrupt has been activated. Therefore interrupts are disabled
immediately when a user system is executing and an interrupt occurs. Upon
completion of the interrupt handler routine, interrupts can be activated until the user
system resumes and the processor tests whether further interrupts happened.
2. Secondly, to define interruption priorities and allow a higher priority interrupt to
interrupt an interrupting operator of lower priority. The interrupt is commended
because the communication line has greater priority than the printer. The ISR printer
is stopped, the stack is pressed and ISR communications are continued to operate.
a)
An interrupt is a signal with the utmost priority of the hardware and software which should
immediately be processed by a processor. Whenever an interrupt occurs, the controller
completes the execution of the current instruction and starts the execution of an Interrupt
Handler or Interrupt Service Routine.
Types of Interrupts
Software - An interruption to software is either caused by an extraordinary condition or by a
special instruction set, which causes the processor to interrupt.
Hardware - A digital alert signal sent from external devices to the processor such as a disk
console or external peripheral is a hardware interrupt.
Approaches to deal with multiple interrupts
1. The first is to deactivate interruptions while processing an interrupt. A deactivated
interrupt basically means that this interrupt request signal can be ignored by the
processor. If a break occurs throughout this time, it is usually ongoing and tested by
the processor once the interrupt has been activated. Therefore interrupts are disabled
immediately when a user system is executing and an interrupt occurs. Upon
completion of the interrupt handler routine, interrupts can be activated until the user
system resumes and the processor tests whether further interrupts happened.
2. Secondly, to define interruption priorities and allow a higher priority interrupt to
interrupt an interrupting operator of lower priority. The interrupt is commended
because the communication line has greater priority than the printer. The ISR printer
is stopped, the stack is pressed and ISR communications are continued to operate.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 13
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.