ITC544 Assessment Item 2: Computer Science Assignment
VerifiedAdded on 2025/08/26
|13
|1663
|197
AI Summary
Desklib provides solved assignments and past papers to help students succeed.

ITC544
Assessment Item 2
Assignment 1 – Computers, Data and Programming
Assessment Item 2
Assignment 1 – Computers, Data and Programming
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Answer 1
a) It is asked in the question to convert the given digit (binary) into the decimals.
0 01111110 10100000000000000000000 is the given question.
The Step which will be followed in the conversion is as follows:
Level 1:
The first and foremost step is to type of the binary number either it is positive or negative.
In binary digit the leftmost digit tells about the sign. Binary digit consists of two no. only
1 and 0.
If the leftmost is 0 it is positive number otherwise 1 then it is negative number.
0 01111110 10100000000000000000000, in the leftmost specifies it is positive number.
Exponent in the binary number 0 01111110 10100000000000000000000
Mantissa in the binary number 0 01111110 10100000000000000000000
Level 2 :
Now first, exponent will be converted to the binary numbers, given exponent - 01111110
= 0 multiply 27 + 1 multiply 26 + 1 multiply 25 + 1 multiply 24 + 1 multiply 23+ 1 multiply
22 + 1 multiply21 + 0 multiply 20
= 0 addition 64 + 32 + 16 + 8 + 4 + 2 + 0
= 126
Level 3 :
Now exponents are adjusted by removing the excess bit.
127 = 2(8-1) subtract one
126 – 127 = 1
Level 4
Mantissa will be converted to the binary number.
10100000000000000000000
= 1 multiply 222 + 0 multiply 221 + 1 multiply 220 + 0 multiply219 + 0 multiply 218 + 0
multiply 217 + 0 multiply 216 + 0 multiply 215+ 0 multiply 214 + 0 multiply 213 + 0 multiply
212 + 0 multiply 211 + 0 multiply 210+ 0 multiply 29 + 0 multiply 28 + 0 multiply 27 + 0
multiply 26 + 0 multiply 25 + 0 multiply 24 + 0 multiply 23 + 0 multiply 22 + 0 multiply 21+
0 multiply 20
= .5 addition. 125
= .625
Level 5
Gathering all the components to form single precision floating system
= - 1 power 0 multiply (one addition .625) multiply 2 power adjusted component
= .8125 which is the conversion of binary to decimal form
b)
a) It is asked in the question to convert the given digit (binary) into the decimals.
0 01111110 10100000000000000000000 is the given question.
The Step which will be followed in the conversion is as follows:
Level 1:
The first and foremost step is to type of the binary number either it is positive or negative.
In binary digit the leftmost digit tells about the sign. Binary digit consists of two no. only
1 and 0.
If the leftmost is 0 it is positive number otherwise 1 then it is negative number.
0 01111110 10100000000000000000000, in the leftmost specifies it is positive number.
Exponent in the binary number 0 01111110 10100000000000000000000
Mantissa in the binary number 0 01111110 10100000000000000000000
Level 2 :
Now first, exponent will be converted to the binary numbers, given exponent - 01111110
= 0 multiply 27 + 1 multiply 26 + 1 multiply 25 + 1 multiply 24 + 1 multiply 23+ 1 multiply
22 + 1 multiply21 + 0 multiply 20
= 0 addition 64 + 32 + 16 + 8 + 4 + 2 + 0
= 126
Level 3 :
Now exponents are adjusted by removing the excess bit.
127 = 2(8-1) subtract one
126 – 127 = 1
Level 4
Mantissa will be converted to the binary number.
10100000000000000000000
= 1 multiply 222 + 0 multiply 221 + 1 multiply 220 + 0 multiply219 + 0 multiply 218 + 0
multiply 217 + 0 multiply 216 + 0 multiply 215+ 0 multiply 214 + 0 multiply 213 + 0 multiply
212 + 0 multiply 211 + 0 multiply 210+ 0 multiply 29 + 0 multiply 28 + 0 multiply 27 + 0
multiply 26 + 0 multiply 25 + 0 multiply 24 + 0 multiply 23 + 0 multiply 22 + 0 multiply 21+
0 multiply 20
= .5 addition. 125
= .625
Level 5
Gathering all the components to form single precision floating system
= - 1 power 0 multiply (one addition .625) multiply 2 power adjusted component
= .8125 which is the conversion of binary to decimal form
b)

(i) 0*AD9 into base -3
It is considered as the number assigned to A = 10, D = 13
= (10 multiply 162) + (13 multiply 161) + (9 multiply 160)
= 2777
As base is given as 3 it will be divided by the 3
The following divisor will (Pal, Kumar and Sharma, 2017, pp 117) come – 2777,
925, 308, 102, 34, 11, 3, 1
The following quotient will come – 925, 308, 102, 34, 11, 3, 1, 0
The following remainder will come – 2, 1, 2, 0, 1, 2, 0, 1
Reading from right to left 10210212 will be the answer.
(ii) 4518 (binary)
4 = 100
5 = 101
1 = 001
The combining 4518 will give 100101001
(iii) 123.35 (octal)
Given base are 5
= 1 multiply 52 + 2 multiply 51 + 3 multiply 50 + 3 multiply 5-1
25 + 10 + 3 +. 6
= 38.6
Conversion into octal will be implemented by dividing 38 by 8 and multiplying .6
with 8
Hence the required answer is 46. 4631
(iv) 14.358 (decimal)
Given base are 8
= 1 multiply 81 + 4 multiply 80 + 3 multiply 8-1+ 5 multiply 8 -2
Hence calculating this value will give the following answer = 12.453125.
It is considered as the number assigned to A = 10, D = 13
= (10 multiply 162) + (13 multiply 161) + (9 multiply 160)
= 2777
As base is given as 3 it will be divided by the 3
The following divisor will (Pal, Kumar and Sharma, 2017, pp 117) come – 2777,
925, 308, 102, 34, 11, 3, 1
The following quotient will come – 925, 308, 102, 34, 11, 3, 1, 0
The following remainder will come – 2, 1, 2, 0, 1, 2, 0, 1
Reading from right to left 10210212 will be the answer.
(ii) 4518 (binary)
4 = 100
5 = 101
1 = 001
The combining 4518 will give 100101001
(iii) 123.35 (octal)
Given base are 5
= 1 multiply 52 + 2 multiply 51 + 3 multiply 50 + 3 multiply 5-1
25 + 10 + 3 +. 6
= 38.6
Conversion into octal will be implemented by dividing 38 by 8 and multiplying .6
with 8
Hence the required answer is 46. 4631
(iv) 14.358 (decimal)
Given base are 8
= 1 multiply 81 + 4 multiply 80 + 3 multiply 8-1+ 5 multiply 8 -2
Hence calculating this value will give the following answer = 12.453125.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Answer 2
Definition of the prime number states that numbers having itself and one as their divisors are
known as prime numbers. In the question it is asked to write code with the help of Marie
simulator that it will give output 1 if its prime number otherwise it will give the code 0.
Algorithm which is applied
total N number of output will be taken
Loop i will move from N to 1.
Iteration process should be processed and for every iteration, verify i divides N
If its divide then count function will be utilized, to count total divisor that divides N.
Prime number will be resulted if count comes to be 2
Steps which occur in miner Simulator
Memory location will be stored in accumulator AC from the data.
Register 1 will store N no. of divisor having the value 00H.
N to one iteration by shifting the accumulator position to E.
To store permanent value store it in the accumulator having B position
process of division will be conducted shifting values from E to D, where accumulator act
as dividend and D act as divisor
When 0 or value less than zero comes for the A – D process.
Increment by one in the count if, accumulator give zero as the value.
Now store the value from B to A and process proceed till E becomes 0.
when values are moved to A from the position C by checking the value of divisor
If the value of divisor is 2 then it is stored at the location 01H otherwise it remain at 00H.
Code of the program
ORG 100 / here ORG represent the origin, it instruct assembler where to store data and
instruction.
Input /Take the input values from the user or programmer
Store userInput /the input taken from the user is stored in the userInput
Store J / for loop, J is stored in userInput
Store K / division part, K is stored in userInput
Load J / load the content of J into AC
Subt One /loop from N-1 to 2 to check if user input is divisible by integer other
Definition of the prime number states that numbers having itself and one as their divisors are
known as prime numbers. In the question it is asked to write code with the help of Marie
simulator that it will give output 1 if its prime number otherwise it will give the code 0.
Algorithm which is applied
total N number of output will be taken
Loop i will move from N to 1.
Iteration process should be processed and for every iteration, verify i divides N
If its divide then count function will be utilized, to count total divisor that divides N.
Prime number will be resulted if count comes to be 2
Steps which occur in miner Simulator
Memory location will be stored in accumulator AC from the data.
Register 1 will store N no. of divisor having the value 00H.
N to one iteration by shifting the accumulator position to E.
To store permanent value store it in the accumulator having B position
process of division will be conducted shifting values from E to D, where accumulator act
as dividend and D act as divisor
When 0 or value less than zero comes for the A – D process.
Increment by one in the count if, accumulator give zero as the value.
Now store the value from B to A and process proceed till E becomes 0.
when values are moved to A from the position C by checking the value of divisor
If the value of divisor is 2 then it is stored at the location 01H otherwise it remain at 00H.
Code of the program
ORG 100 / here ORG represent the origin, it instruct assembler where to store data and
instruction.
Input /Take the input values from the user or programmer
Store userInput /the input taken from the user is stored in the userInput
Store J / for loop, J is stored in userInput
Store K / division part, K is stored in userInput
Load J / load the content of J into AC
Subt One /loop from N-1 to 2 to check if user input is divisible by integer other
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Store J /then 1 and itself
Load userInput /check the value of userinput to be greater than 1
Subt One /when it is not greater than one it will give output zero
Skipcond 800 / AC>0
Jump invalid
loop, Load J /loop iterate from N-1 to 2
Subt One
Skipcond 400 / AC = 0
Jump gtTwo
Load One /prime number is considered when input is divisible by the number ranging from 2 –
(N-1) if not, then it is not prime number
Output /the output will come as zero
Halt / program end
gtTwo, Jump divide
after, Load RES
Skipcond 800 / when J divides K, then it is not considered as prime number
Jump cNext /otherwise check for J-1
Load Zero
Output
Halt / program end
cNext, Load userInput
Store K
Load J
Subt One
Store J
Load userInput /check the value of userinput to be greater than 1
Subt One /when it is not greater than one it will give output zero
Skipcond 800 / AC>0
Jump invalid
loop, Load J /loop iterate from N-1 to 2
Subt One
Skipcond 400 / AC = 0
Jump gtTwo
Load One /prime number is considered when input is divisible by the number ranging from 2 –
(N-1) if not, then it is not prime number
Output /the output will come as zero
Halt / program end
gtTwo, Jump divide
after, Load RES
Skipcond 800 / when J divides K, then it is not considered as prime number
Jump cNext /otherwise check for J-1
Load Zero
Output
Halt / program end
cNext, Load userInput
Store K
Load J
Subt One
Store J

Jump loop
divide, Load K / when K is divided by J RES will be set to 1 otherwise to 0
Skipcond 800 /If AC > zero then continue the loop
Jump final /else jump to final
Load K
Subt J
Store K
Jump divide
final, Load K
Skipcond 400 /if AC is zero than J divides K
Jump notDb /otherwise jump to notDb
load One
Store RES
Jump after
notDb, Load Zero /Store 0 in RES if K is not divisible by K
Store RES
Jump after
invalid, Load Zero /output 0 if user input is less than 1
Output
Halt / program end
/Variables
userInput, DEC 0
K, DEC 0
J, DEC 0
RES, DEC 0
divide, Load K / when K is divided by J RES will be set to 1 otherwise to 0
Skipcond 800 /If AC > zero then continue the loop
Jump final /else jump to final
Load K
Subt J
Store K
Jump divide
final, Load K
Skipcond 400 /if AC is zero than J divides K
Jump notDb /otherwise jump to notDb
load One
Store RES
Jump after
notDb, Load Zero /Store 0 in RES if K is not divisible by K
Store RES
Jump after
invalid, Load Zero /output 0 if user input is less than 1
Output
Halt / program end
/Variables
userInput, DEC 0
K, DEC 0
J, DEC 0
RES, DEC 0
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

/Constants
One, DEC 1
Zero, DEC 0
Figure 1: when input is 2
One, DEC 1
Zero, DEC 0
Figure 1: when input is 2
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 2: when input is -2

Figure 3 : when input is 15
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Figure 4 : when input is 17
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Answer 3
a) Memory Interleaving is the algorithm in which we split the memory is divided into
various block. There are two types of bit is present which are high order bit and low order
bit. address location of this bit is categorizes memory (Lin, 2019) interleaving into two
subset which are specified as below
High order Interleaving – It is type of memory interleaving process in which we
address is stores with the help of high order bit and remaining part is stored the location
of that memory block.
For example – Given the memory interleaving process to be of 4 ways, which specifies
we have total of 4 memory bank having size 16 multiply by 8, hence it can be inferred
that it contain 4 address present in byte
To select memory block we need 16 divided by 8 = 2 bit.
Low order Interleaving – It is the second part of the memory interleaving process, in
which lower order bit stores address and high order bit is used to store the location of that
address.
For example – Given the eight way process of memory interleaving and memory is
given with 32 multiply 8.
Location in each memory block = 32 divided by 8 = 4
Bit which is required to select the 8 – memory bank = 23 = 8 (3 bit)
Location 22 = 4 = 2 bit.
04
05
06
07
08
09
10
11
12
13
14
15
00
01
02
03
00 01 10 11
0
8
16
24
1
9
17
25
2
10
18
26
3
11
19
27
4
12
20
28
5
13
21
29
6
14
22
30
7
15
23
31
a) Memory Interleaving is the algorithm in which we split the memory is divided into
various block. There are two types of bit is present which are high order bit and low order
bit. address location of this bit is categorizes memory (Lin, 2019) interleaving into two
subset which are specified as below
High order Interleaving – It is type of memory interleaving process in which we
address is stores with the help of high order bit and remaining part is stored the location
of that memory block.
For example – Given the memory interleaving process to be of 4 ways, which specifies
we have total of 4 memory bank having size 16 multiply by 8, hence it can be inferred
that it contain 4 address present in byte
To select memory block we need 16 divided by 8 = 2 bit.
Low order Interleaving – It is the second part of the memory interleaving process, in
which lower order bit stores address and high order bit is used to store the location of that
address.
For example – Given the eight way process of memory interleaving and memory is
given with 32 multiply 8.
Location in each memory block = 32 divided by 8 = 4
Bit which is required to select the 8 – memory bank = 23 = 8 (3 bit)
Location 22 = 4 = 2 bit.
04
05
06
07
08
09
10
11
12
13
14
15
00
01
02
03
00 01 10 11
0
8
16
24
1
9
17
25
2
10
18
26
3
11
19
27
4
12
20
28
5
13
21
29
6
14
22
30
7
15
23
31

b) given the memory interleaving as the 32 which means it has 32 block of memory bank.
4 K x 8 means it contain total 4096 bytes
32 bit = 2 5 and hence 5 bit are used for memory block
4096 = 212 and hence it means 12 bits are used for location
High order interleaving – 12 bits selected for location while first 5 bit for selecting
memory
Low Order interleaving – last 5 bits are used for selecting memory and remaining
first 12 bit are used for memory location
0
1
2
.
.
4095
4096
.
.
.
8191
8192
8193
.
.
12281
126975
.
.
.
.
131071
0
32
.
.
.
131040
1
33
.
.
.
1310
41
2
34
.
.
.1310
42
30
.
.
.
13107
0
31
63.
.
.
.
13107
1
4 K x 8 means it contain total 4096 bytes
32 bit = 2 5 and hence 5 bit are used for memory block
4096 = 212 and hence it means 12 bits are used for location
High order interleaving – 12 bits selected for location while first 5 bit for selecting
memory
Low Order interleaving – last 5 bits are used for selecting memory and remaining
first 12 bit are used for memory location
0
1
2
.
.
4095
4096
.
.
.
8191
8192
8193
.
.
12281
126975
.
.
.
.
131071
0
32
.
.
.
131040
1
33
.
.
.
1310
41
2
34
.
.
.1310
42
30
.
.
.
13107
0
31
63.
.
.
.
13107
1
⊘ 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.