Computers, Data, and Programming: Solved Problems and Explanations

Verified

Added on  2025/08/26

|13
|1190
|151
AI Summary
Desklib provides solved assignments and past papers to help students succeed.
Document Page
ITC544 - ASSESSMENT ITEM 2 ASSIGNMENT 1: COMPUTERS, DATA AND
PROGRAMMING
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
Table of Contents
Question 1:..................................................................................................................................................3
Answer (a):..............................................................................................................................................3
Answer: b................................................................................................................................................4
Question 2...................................................................................................................................................6
Answer:...................................................................................................................................................6
Question 3:..................................................................................................................................................7
Answer (a):..............................................................................................................................................7
Answer B:................................................................................................................................................8
References.................................................................................................................................................10
Document Page
Question 1:
Answer (a):
The given value in the binary form is
0 01111110 10100000000000000000000
According to this value, the representation of sign will be 0.
It can be shown through this representation that the exponent will be 01111110.
So, this will be representing as
E=126.
This result will be defined or represents as
=0 01111110 10100000000000000000000*2E-127
= 0 01111110 10100000000000000000000*2126-127
= 0 01111110 10100000000000000000000*2-1
Then, make the conversions in 1101 to the form of decimal. The resultant will be
=1*20 + 1*2-1 + 0*2-2 + 1*2-3
=1+0.5+0.125
=1.625
So, the resultant will be defined as
=1.625*2-1 or
=1.625/2 or
=0.8125
Hence, the value can be defined as 0.8125.
Document Page
Answer: b
1. 0xAD9 into the 3-base representation
Step 1:
Initial change the representing value in the form of base 10. The resultant will be
= 10*162 + 13*161 + 9*160
=2777
Step 2:
Change this base 10 value in the base 3 form:
(2777/3)=925 [the remainder will be 2]
(925/3)=308 [the remainder will be 1]
(308/3)=102 [the remainder will be 2]
(102/3)=34 [the remainder will be 0]
(34/3)=11 [the remainder will be 1]
(11/3)=3 [the remainder will be 2]
(3/3)=1 [the remainder will be 0]
(1/3)=0 [the remainder will be 1]
The output will represent as 10210212.
2. 4518 into 2-base (binary) representation
Step 1:
The representation of octal can be represent in pair of the 3-bits.
Step 2:
So, the value in 3 bits will be represent in binary form.
Step 3:
The output can be represented as
100 101 001 in base 2 form.
3. 123.35 into octal representation (up to 3 octal points)
Step 1:
Conversion of 123.35 in form of decimal:
= 1*52 + 2*51 + 3*50 + 3*5-1
= 38.6
The result can be written as
= 38.6
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
Step 2:
Conversion of 38.6 in form of octal,
The result can be written as
38/8=4 [the remainder will be 6]
4/8=4 [the remainder will be 6]
The output can be shown as
= .6*8=4.8 or
= .8*8=6.4
Hence, the output will be written as 46.463.
4. 14.358 into a decimal representation
Step 1:
Convert 14.35 in form of decimal. The equation will be converted in
= 1*81 + 4*80 + 3*8-1 + 15*8-2
= 12.4583125
Step 2:
The output will be defined as 12.4583125.
Document Page
Question 2
Answer:
ORG 100
Input /Take the user input
Store data/store the input in userinput
Store P/Also store userinput in B for loop
Store Q /Also store userinput in A for division part
Load P
Subt One /loop Porn n-1 to 2 to check if user input is divisible by integer other
Store P/then 1 and itself
Load data/check if user input is greate then 1 or not
Subt One /if it is not then output 0
Skipcond 800
Jump invalid
loop, Load P /loop from n-1 to 2
Subt One
Skipcond 400
Jump gtTwo
Load One /if input is not divisible by any number between 2 to n-1 than it is not a prime number
Output /Output 0 in this case
Halt
gtTwo, Jump divide
after, Load RES
Skipcond 800 /Check if J can Divide A if yes then user input not a prime number
Jump cNext /if not check for J-1
Load Zero
Output
Document Page
Halt
cNext, Load Data
Store Q
Load P
Subt One
Store P
Jump loop
divide, Load Q /Sets RES 1 if J divides I or 0 if not
Skipcond 800 /If AC is greate than zero then continue the loop
Jump final /else jump to final
Load Q
Subt P
Store I
Jump divide
final, Load Q
Skipcond 400 /if AC is zero than J divides I
Jump notDb /other wise jump to notDb
load One
Store RES
Jump after
notDb, Load Zero /Store 0 in RES if I is not divisible by I
Store RES
Jump after
invalid, Load Zero /output 0 if user input is less than 1
Output
Halt
/Variables
Data, DEC 0
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
Q, DEC 0
P, DEC 0
RES, DEC 0
/Constants
One, DEC 1
Zero, DEC 0
Document Page
Document Page
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:
Answer (a):
Interleaving of low order:
Interleaving of low order can be defined as interleaving which can be used easily to spread out
the location of memory. It is commonly based on form of contiguous which is in the horizontal
form over the modules. It implies that low order bits along with the address of memory which
can used and helps in proper evaluation of the memory module. The bits in higher order can be
replaced out from each module. The memory banks contain the several consecutive addresses.
Example:
Consider the memory with 64-word which interleaved for the 4 ways. It can also be defined that
4 banks of memory have the capacity through which they can store the 16 number of bits in
every bank.
In case, if these banks of the memories can interleave within low order, it means that the words
allocations can be defined as in the form:
Assume bank 0:
00,04,08,12,16,20,24, ……………….,60
Assume bank 1:
01,05,09,13,17,21,25, ……………….,61
Assume bank 2:
02,06,10,14,18,22,26, ……………….,62
Assume bank 3:
03,07,11,15,19,23,27, ……………….,63
Interleaving of high order:
High order interleaving used all the high number bits which can perform the address of the
module. This arrangement is considered as the best one because this is in the form of range
which starts from 26A to 27A. all this arrangement is in the form of determiner of module. This
is considered to feed up two lines in the decoders from 2 to 4 set and the overall output will be
generated in the four-bit form.
Example:
S.no. Address Module
1. 0-64 M 0
Document Page
2. 64M to 128M 1
3. 128M to 192M 2
4. 192M to 256 M 3
Answer B:
Step1:
Suppose that memory is exist with chips of 32 4K*8 bit. It means that the interleaving is
conducted within the 32 ways in the memory or the blocks. This memory block exists with the
4096 bytes.
Step2:
The memory block can be generated when total number bits are used and the result will be 25
which is 32. It means that 12 bits will be represents with 25 will be 4096.
Step3:
The blocks can be selected from the memory blocks and it uses the total 12 bits.
Step 4:
0
4096
8192
.
.
126.975
1
4097
8193
.
.
126.976
2
4098
8194
.
.
126.977
…………………………

…………………………
…………………………
.
.
…………………………
4095
8191
12281
.
.
131.071
Step5:
For low order interleaving:
0
1
2
.
32
33
34
.
64
65
66
.
…………………………

…………………………

…………………………
131040
131041
131042
.
chevron_up_icon
1 out of 13
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]