You are on page 1of 25

HiLCoE

School of Computer Science & Technology

ict Home individual assignment questions


Program: B.Sc. in computer science

Course Name: ICT-Fundamental(CS211)

Submitted to: Assistant professor:Behailu G.

Submitted by :

Name: Munir Ali

Section: 2101B

Id number:WE 3800

1
introduction and References I used for solving the
questions
I solved the assignment using the arrangement for every
question given I explained the answer below. And I tried
to solve briefly so I didn’t give only the result I briefly
showed the steps of solving.
for given questions the references that I used for solving
the questions are :-
1,lecture note
2, Wiki pedia
3, a trusted and official youtube site named tutorials.com
4, wiki how
5, google.com
7, a trusted and official youtube site named
Education.4U.

2
Answer for questions covered from lesson 5 -8
Direction:
• Complete all questions.
• Questions cover lesson 5-8.
I. Basic Data Representation
1,Given a n-digit base r number: dn-1dn-2dn-3...d2d1d0 (base r), the decimal equivalent is given
by:
dn-1×rn-1 + dn-2×rn-2 + ... + d1×r1 + d0×r0
, show the decimal equivalent for the examples below:
A) A1C2H
B) 10110B

Answer:
A, A1C2H
-to convert this hexa decimal number into its equivalent decimal number form we should follow
the steps below:
Step 1, Change the letters into their equivalent hexadecimal number form. As we know the letter
A corresponds to 10 and the letter C corresponds to 12 in the hexa decimal number system. So
A=10, C=12
Step 2 starting from right to left, multiply the 1st number by 16 to the 0 power and the 2nd number
by 16 to the 1 power and …………………..until the end of the digit represented. After that add
them all.
A 1 C 2H
163 162 161 160 H we know from step 1 that A=10 and C=12
16^0*2+16^1*12+16^2*1+16^3*10
2+192+256+40,960=41,410
Thus, A1C2H=41,410D
B, 10110B
3
- To convert this binary number to hexa decimal we use the positional notation. The steps
for converting 10110B to decimal number is showed below:-
Step 1:- Write the binary number and list the power of 2 from right to left.
1 0 1 1 0
24 23 22 21 20
Step 2:- write and the digits in the binary below with their corresponding powers of two.
1 0 1 1 0
16 8 4 2 1
Step 3:- write down the final values of each points of two.move through each digit of the binary
number. If the digit is 1, write the corresponding power of 2 below the line under the digit. If the
digit is 0 write 0 below the line under the digit and add final values.
16+0+4+2+0=22 so our final answer is 10110B=22D
2, show the steps of conversion process from 18.6875D to hexa decimal?
Answer

step 1:- we will divide this into 2 parts named A and B(part A and part B).
step 2: in part A we will solve the integer part which is 18 and in part B we will solve the
fractional part which is 0.6875.
part A
-the integer part of the given decimal number is 18.
-divide 18 by 16 using long division.
When we do the long division we get 1 with Remainder=2.
-we will divide 1 by 16 using long division .
When we do the long division we get 0 with R=1 since our quotient
is 0 we will stop the process and write the remainder from bottom to top.
So our answer is 12, which is 18D=12H.

part B
the fraction part of the given decimal
Number is 0.6875.

4
– we will multiply 0.6875 by 16 . When we do we get 11.0. in here our interest is the integer part
so we will separate the integer part and note it down so we note down 11 and ignore it for the
next iteration. Which leads 0.0.
-then we will multiply 0.0 by 16.when we do we get 0 since we get zero we will ignore this step
and end the process. The result is writing down the noted down integer parts from top to bottom.
-so the result is 11 which corresponds to B in hexa decimal form. So 0.6875D=BH
-step 3:- as we get our answer for part A and part B. we just need to combine part A and part B to
get our final answer.
That is 18.6875D=12.BH
3, Convert the following hexadecimal numbers into binary and decimal numbers:
A) ABCDE
B) 1234
C) 80F

Answer
A, we will convert ABCDE into binary and decimal number.
To convert ABCDEH in to binary:-

Step 1, convert the alphabets into equivalent hexadecimal number form.


A=10,B=11,C=12,D=13,E=14
Step 2:- separate the digits, which is the alphabets converted to equivalent HCD form and those
who aren’t converted if they present.
A B C D E
10 11 12 13 14
Step 3:- change the equivalent decimal numbers into binary in the form of grouping with 4 bits.
A=1010, B=1011, C=1100 , D= 1101 , E=1110
Step 4:- combine the results and our final answer is ABCDEH=10101011110011011110B
And to convert ABCDE into decimal number:-

Step 1: change the letters into equivalent decimal number and multiply the 1st number starting
from right to left by 16 to the 0 power and the second number by 16 to the 1
power…………..until the end of the digits.
A B C D E
10 11 12 13 14

5
164 163 162 161 160

16^4*10+16^3*11+16^2*12+16^1*13+16^0*14
653,360 45,056 3072 208 14
Step 4:- add them all and represent the result with base 10.
653,360+45,056+3072+208+14=703,710D
B, to convert 1234H to binary:-

We will follow the same step as A so I will try to minimize it because I showed the steps breafly
in question A.
1 2 3 4
0001 0010 0011 0100
The we will combine the converted binary number that is 0001001000110100.
But we can left those 2 zeros that are infront and write 1001000110100.
So, 1234H=1001000110100B
And to convert 1234H to decimal:-

1 2 3 4
163 162 161 160
16^3*1 16^2*2 16^1*3 16^0*4
4096 512 48 4
-finally,we will add them and represent in base 10
4096+512+48+4=4660 then 1234H=4660D
C, to convert 80FH to binary :-

8 0 F
8 0 15
1000 0000 1111
Then, we combine the converted binary numbers that is 100000001111
So, 80FH=100000001111B
And to convert 80FH to decimal :-

6
8 0 F
8 0 15
162 161 160
16^2*8 16^1*0 16^0*15
2048 0 15
finally, we will add them all that is 2048+0+15=2063 in which 80F=2063D.
4, Convert the following binary numbers into hexadecimal and decimal numbers:
A) 1000011000
A) 10000000
B) 101010101010

Answer

A, To convert 1000011000B in to hexadecimal:-

Step 1: we will group it into 4 bit and add zeroes to those wo doesn’t fulfill 4 bits,
0010 0001 1000
Step 2:- separate each digit of the grouped binary numbers and we use the positional notation for
each digit.
0 0 1 0 0 0 0 1 1 0 0 0
2 3 22 21 20 23 2 2 21 20 23 22 21 20
0 0 2 0 0 0 0 1 8 0 0 0
2 1 8
Finally we will combine the results that is 218. In which 1000011000B=218H.
And To convert 1000011000B in to decimal:-

1 0 0 0 0 1 1 0 0 0
29 28 27 26 25 24 23 22 21 20
512 256 128 64 32 16 8 4 2 0
512 0 0 0 0 16 8 0 0 0
Finally, add them
512+8+16=536 in which 1000011000B=536D.
B, to convert 10000000B into hexadecimal-

7
1 0 0 0 0 0 0 0
23 22 21 20 23 22 21 20
8 0 0 0 8 0 0 0
8 0 0 0 0
So our final answer is by combining the two grouped binary numbers
That is 80 in which 10000000B=80H.
and to convert 10000000 into decimal:-

1 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 0
128 0 0 0 0 0 0 0
Finally, our answer is 128 in which 10000000B=128D.
C, to convert 101010101010 to hexadecimal:

1 0 1 0 1 0 1 0 1 0 1 0
23 22 21 20 23 22 21 20 23 22 21 20
8 4 2 0 8 4 2 0 8 4 2 0
8 0 2 0 8 0 2 0 8 0 2 0
8+2=10 8+2=10 8+2=10
10 corresponds to A in hexadecimal form so we will combine the results that is AAA.
In which 101010101010B=AAAH
And to convert 101010101010 to decimal:

1 0 1 0 1 0 1 0 1 0 1 0
211 210 29 28 27 26 25 24 23 22 21 20
2048 1024 512 256 128 64 32 16 8 4 2 1
2048+512+128+32+8+2=2730
That means our final answer is 101010101010B=2730D
5, Convert the following decimal numbers into binary equivalent:
A) 19.25D
B) 123.456D

8
Answer

A, to convert 19.25D to binary:-

The syntax for converting decimal fraction to binary is:-


1,separate the integer part 19 and convert it binary by using division of 2
2, multiply the given decimal fraction by 2
3, note down the integer part and multiply the fraction part
4, repeat step 2 until the fractional part is 0 and note down all the integer part
5, now write the numbers from top to bottom .
So we will convert 19 to binary by using division of 2;-
Quotient remainder
19/2 9 1
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1
So, 19D=10011B
So for converting 0.25D to binary we can show this by the table below:-
carry
0.25*2=0.5 0
0.5*2=1.0 1
0.0*2=0
Since the fraction part is 0 we write the integer from top to bottom which is .01.
As we convert the integer part and the fraction part we just combine the two results to get oue
final answer.
That is 19.25D=10011.01B
B, to convert 123.456 to binary:-

Conversion of the integer part which is 123


Quotient remainder
123/2 61 1
61/2 30 1

9
30/2 15 0
15/2 7 1
7/2 3 1
3/2 1 1
1/2 0 1
So our answer is 1111011 in which 123D=1111011B
And lets convert the fraction part which is 0.456 into binary
carry
0.456*2=0.912 0
0.912*2=1.824 1
0.824*2=1.648 1
0.648*2=1.296 1
0.296*2=1.184 1
0.184*2=0.368 0
0.368*2=0.736 0
0.736*2=1.472 1
0.472*2=0.944 0
0.944*2=1.888 1
0.888*2=1.776 1
As fractional part doesn’t become 0. So we choose the process till 12 bits and end the process.
Then our answer is 0.011101001011.
So to get our final answer we just need to combine the two.
That is 1111011.011101001011 in which 123.456D=1111011.011101001011B
6, Given the n-bits, fill the minimum and maximum equivalent values on the tabulated below :

n Minimum Maximum(2^n)-1

8 0 255

16 0 65,535

32 0 4,294,967,295

64 0 18,446,744,073,709,551,615

10
7, Based on IEEE-754 32-bit Single-Precision Floating-Point Numbers as it is indicated on the
below.

A) Suppose that the 32-bit pattern is 1 1000 0001 011 0000 0000 0000 0000 0000, find the
normalized form of the actual floating point number?
B) suppose that the 32-bit pattern is 0 10000000 110 0000 0000 0000 0000 0000, find the
normalized form of the actual floating point number?

Answer

A,

1 100000 01100000000000000
01 000000
S E F
This means S=1
E=10000001
F=01100000000000000000000
The normalized form for single precision 32-bit floating point representation is (1.F)2^E-7
-1.F=1. 01100000000000000000000, then we will convert this fractional part to decimal number.
So it will be 2^0*1+2^-1*0+2^-2*1+2^-3*1=1+0+0.25+0.125=1.375D
Nut the sign bit which indicates the sign of the number is 1 it means it is represented in negative
sign.then 1.F=-1.375D
And then we will convert E=10000001 to decimal number which is equal to E=129
Then we calculate E-127:-
129-127=2
Thus, the number represented is -1.375*2^2=-5.5D

11
B, The normalized form for single precision 32-bit floating point representation is (1.F)2^E-7
S=0
E=10000000
F=11000000000000000000000
1.F=1. 11000000000000000000000 then we will convert this fractional part to decimal number.
So it will be 2^0*1+2^-1*1+2^-2*1=1+0.5+0.75=1.75D
As the sign bit is 0 it represents the number has a positive sign1.F=+1.7D
And then we will convert E= 10000000to decimal number which is equal to E=128
Then we calculate E-127:-
128-127=1
Thus, the number represented is +1.75*2^1=+1.75*2=+3.5D
8, Given 2 number system, evaluate the expressions?
A) 1 1 0 1 - 1 0 1 0
B) 0 0 1 1 0 0 + 1 0 1 1 1 1
C) 14 10 – 7 10
D) 9 10 - 13 10

Answer

A, 1 1 0 1 - 1 0 1 0= 0011
B, 0 0 1 1 0 0 + 1 0 1 1 1 1= 111011
C, 14 10 – 7 10=7D
D, ) 9 10 - 13 10 =-4D

9, Given two string expressions, show the possibility of 3-bits pattern ASCII character encoding
string
comparisons?
A) 'AA' < 'AD'
B) 'AA' > 'Aa'
Answer

12
10, If R = +8 and S = +3, determine R + S in byte-form using 2's complement notation.
Show the no overflow detection using ALU circuit diagram that makes this determination
Answer

R=+8 this can be indicated as


sign bit of R Actual binary of R

0 1000

But , according to the question it asks us to determine the addition in 8 bits.


So the actual binary of R is in 4 bit so we add 3 zeros to make it 7 bit and we will add the sign
bit to it and it will be in 8 bit form.
R=00001000
S=+3 this can be indicated as

sign bit of R Actual binary of R

0 11

The actual binary of 3 is in 2 bit so we add 5 zeros to make it 7 bit and we will add the sign bit to
it and it will be in 8 birt form
S=00000011
Then we will add R and S vertically:-

R(+8) 00001000
S (+3) +00000011
+11 00001011

13
So, R+S= 00001011 as we see clearly there is no over flow because of the carry in and the carry
out from the MSB is equal. But , according to the question it asks us to show no overflow
detection using the ALU circuit diagram that makes this determination.
So the ALU circuit over flow detection can be seen by the below diagram;-
In alu circuit result of an operation will be stored in registers. But if an over flow
is detected the over flow flag is set to 1 that means 1 will be stored. But in this case only reslut
will be stored since there is no over flow because the carry into the MSB and the carry
from the MSB which is checked by the detecter is equal.
REG
00 001 011 (+11)
2’s complement
overflow detect
circuit

function selecter(Add)

(+8) 0 0 0 010 0 0 0 0 0 00 0 1 1 (+3)

11, Overflow occurs when X and Y are of the same sign but X +Y is represented in a different
sign. Show this with at least one appropriate example.
Answer

for example if we asked to determine the sum of X and Y in byte using 2’s complement in
which X=+100 and Y=+30
then X=+100

sign bit of X Actual binary of X

14
0 1100100

the 8 bit representation of X =01100100.

Y=+30

sign bit of Y Actual binary of Y

0 11110

the 8 bit representation of Y= 00011110


as we can see from above X and Y have the same sign which is positive. Let’s see what is the
sign of X+Y by adding them.
we will add X and Y vertically:-

X(+100) 01100100
Y(+30) + 00011110
+130 10000010
X+Y=10000010 , as the MSB is 1 it indicates this binary expression represents a negative
number in 2’s complment notation.
as the sign of X and Y is positive but the sign of X+Y is negative so, there is an over flow
occurrence.
II. Answers for question under Database Management System
Answers for choice

15
12,A13,A14,A15,B16,B17,D18,D
19, Describe the data definition for a given data base table?

Data definition:- is the process of describing the properties of data to be included in a database
Full Name Telephone Current table.
number place For a employs assigning database table below:-
Kedir 0934567897 Adama
abdela
Abebe 0975643312 Addis
bishaw ababa
Muhamed 0965423476 Addis
zeynu ababa

data definition for this database table is describing the properties of datas to be included in the
table above that are named as the Full name,Telephone number,Current place .
20, Discuss a database model that requires less in-house hardware and maintenance?

Answer
A cloud database :- is a data base service built and accessed through a cloud form.and it is
typically hosted on a cloud data base provider servers that is accessible to users via the web.
cloud databases used for information retrieval,supporting and facilitating E-commerce and
allowing web [ages to be dynamic we pages.
III. Answers for questions under Computer Security

Answers for choice

21,A 22,C 23,D 24,D25,B

26, Briefly discuss at least three feature of a java security model with appropriate example?

Answer

1,Platform security ;- which is built in language security features enforced by the java
compiler and virtual machine. That provides safe and secure platform for developing and
application running. And it have features like :-
o Strong data type :- compile data type checking and automatic management leads
to more robust code and reduces memory corruption and vulnerabilities.
o Secure class loading:- class leaders ensure that untrusted code cannot interfere
with running of other java programs.
2, cryptography:- is comprehensive API with support for a wide range of cryptographic services
including digital signatures, message digests,ciphers,key generators. It has a benefit of providing
an extensible full featured API for building secure applications.

16
3, Authentication and acess control :- this feature abstracts authentication APIs that can
incorporate a wide range of login mechanisms through a pluggable architecture. A
comprehensive policy and permissions API that allows the developer to create and administer
applications requiring fine-grained access to security-sensitive resources.

Which has a benefit of:-


o Enabling single -sign-on a multile authentication mechanisms and fine-grained acess to
resources based on the identity of the user or code signer
o Support far time stamped signatures it easier to deploy sign code by avoiding the need to
re-sign code when the signatures certificate expires
o Public key infrastructure
27, Elaborate ways of vulnerability management?

Answer

Vulnerability management is a strategy that organizations can use to track, minimize and
eliminate vulnerabilities in their systems. It involves identifying and classifying
vulnerabilities so that appropriate protections can be applied or remediations taken.
For example let’s see some ways we can manage vulnerability:-

Identity vulnuberalities: The first stage of the management process requires identifying which
vulnerabilities might affect your systems. Once you know what vulnerabilities or types of
vulnerabilities you are looking for, you can begin identifying which are present.

This stage makes use of threat intelligence information and vulnerability databases to guide
your search. It also often includes the use of vulnerability scanners to identify affected
components and create an inventory for use in patch management.

As part of this phase, you want to create a full map of your system that specifies where assets
are, how those assets can potentially be accessed and what systems are currently in place for
protection. This map can then be used to guide the analysis of vulnerabilities and ease
remediation.

Evaluating vulnerabilities: After you have identified all possible vulnerabilities in your system,
you can begin evaluating the severity of threats. This evaluation helps you determine where to
prioritize your security efforts and can help reduce your risks faster.

17
If you start remediating the most severe vulnerabilities first, you can reduce the chance that an
attack will occur while securing the rest of your system. When evaluating vulnerabilities, there
are several systems you can use to establish the risk of a vulnerability being exploited.

Remediating vulnerabilities: With a prioritized vulnerability management plan in place you can
begin remediation efforts. During this phase, you may also want to increase monitoring or
reduce access to areas identified as at risk. This can help prevent successful exploitation of
vulnerabilities until you can apply patches or permanently increase protections.

After vulnerabilities are addressed make sure that you verify successful remediation.
Penetration testing is useful for this as it can help you gauge the effectiveness of your fix. It
can also help you ensure that new vulnerabilities weren’t created during your efforts.

28, What programs are used by FBI for eavesdropping on the systems of internet service
providers?

Answer: Carnivore and Narlls nsight

29, Given a message:” we need a peace”. Determine the ciphertext of this plaintext using
monoalphabetic substitution encryption algorithm?

Answer

plain text a b c d e f g h i j k l m n o p q r s t u v w x y z
alphabet

Cipher- M U N I R T E C H V W Y Z A B F Q G O P D L K J S X
text
alphabet

The cipher text of the word “we need a peace” is=KR ARRI M FRMNR

30, Given the keyword: “DIA” and message:”Man is different from other beings”, apply a
polyalphabetic substitution cipher?

18
Key word: D I A D I A D I A D I A D I A D I A D I A D I A D I A D I

Plain text: M a n I s d I f f e r e n t f r o m o t h e r b e I n g s

Cipher text: P I N L A D L N F H Z E I B F U W M R B H G H B G Q N J A

So the cipher text for the word ”Man is different from other beings” and given key word DIA
is=PINLADLNFHZEIBFUWMRBHGHBGQNJA

31, Describe the transpositions algorithms with an appropriate example?

Answer

Transposition algorithm is the way of rearranging the units of the message in some pattern.

For example: lets take a block of message 1 2 3 4 5

Then will rearrange it. 3 14 5 2

Let’s use the above transposition to encrypt Hello World.

We need to break out our message in couple of blocks and apply the transposition to each
block.

12345 1 2345

HELLO WORLD

31 452 3 1 4 52

LE LOE RWLDO HELLO WORLD becomes L E L O E RWLDO

Answers for questions under Future Generation Technology

32, Define the architecture of docker engine?

19
Docker architecture :- which refers to the docker engine.follows Client-Server architecture,
which includes the three main components that are Docker Client, Docker Host, and Docker
Registry.

1. Docker Client

Docker client uses commands and REST APIs to communicate with the Docker Daemon
(Server). When a client runs any docker command on the docker client terminal, the client
terminal sends these docker commands to the Docker daemon. Docker daemon receives these
commands from the docker client in the form of command and REST API's request.Note:
Docker Client has an ability to communicate with more than one docker daemon.

Docker Client uses Command Line Interface (CLI) to run the following commands -

docker build

docker pull

docker run

2. Docker Host

Docker Host is used to provide an environment to execute and run applications. It contains the
docker daemon, images, containers, networks, and storage.

3. Docker Registry

20
Docker Registry manages and stores the Docker images.

There are two types of registries in the Docker -

Pubic Registry - Public Registry is also called as Docker hub.

Private Registry - It is used to share images within the enterprise.

Docker Objects

There are the following Docker Objects -

Docker Images

Docker images are the read-only binary templates used to create Docker Containers. It uses a
private container registry to share container images within the enterprise and also uses public
container registry to share container images within the whole world. Metadata is also used by
docket images to describe the container's abilities.

Docker Containers

Containers are the structural units of Docker, which is used to hold the entire package that is
needed to run the application. The advantage of containers is that it requires very less resources.

In other words, we can say that the image is a template, and the container is a copy of that
template.

Docker Networking

Using Docker Networking, an isolated package can be communicated. Docker contains the
following network drivers -

21
o Bridge - Bridge is a default network driver for the container. It is used when multiple
docker communicates with the same docker host.
o Host - It is used when we don't need for network isolation between the container and the
host.
o None - It disables all the networking.
o Overlay - Overlay offers Swarm services to communicate with each other. It enables
containers to run on the different docker host.
o Macvlan - Macvlan is used when we want to assign MAC addresses to the containers.

Docker Storage

Docker Storage is used to store data on the container. Docker offers the following options for the
Storage -

o Data Volume - Data Volume provides the ability to create persistence storage. It also
allows us to name volumes, list volumes, and containers associates with the volumes.
o Directory Mounts - It is one of the best options for docker storage. It mounts a host's
directory into a container.
o Storage Plugins - It provides an ability to connect to external storage platforms.

33, What are the differences between kubernetes and docker?

The differenece between kubernets and dockers can be show on the table below:-

kubernets dockers
It requires a series of manual steps Installing Docker is a matter of one-liner command on Linux Platform like
to setup Kubernetes Master and Debian, Ubuntu, and CentOS.
worker nodes components in a
cluster of nodes

Kubernetes can run on various To install a single-node Docker Swarm or Kubernetes cluster, one can
platforms: from your laptop, to VMs deploy Docker for Mac & Docker for Windows
on a cloud provider, to a rack of
bare metal servers. For setting up a
single node K8s cluster, one can use
Minikube.

22
Kubernetes support for Windows Docker has official support for Windows 10 and Windows Server 2016 and
server is under beta phase. 1709.

Kubernetes Client and Server It’s so easy to upgrade Docker Engine under Docker for Mac & Windows
packages need to be upgraded via just 1 click.
manually on all the systems.

34. Mention at least one scenario that is applicable for container orchestration? Give at
least two examples of this orchestration technology?

Container orchestration is all about managing thelifecycles of containers, especially in large


dynamic environments. Software teams use container orchestration to control and automate
many tasks such as provisioning and deployment of containers , redundancy and availability of
containers.
● among Examples of this technology some of the are Kubrenetes and Docker Swarm.

35, Define a serverless computing with appropriate example? How does this serverless
work?

Serverless computing is cloud computing execution model in which the cloud provider allocates
machine resources on demand, taking care of the servers on behalf of their customers. Serverless
computing does not hold resources in volatile memory; computing is rather done in short bursts
with the results persisted to storage. When an app is not in use, there are no computing resources
allocated to the app. Pricing is based on the actual amount of resources consumed by an
application. It can be a form of utility computing. "Serverless" is a misnomer in the sense that
servers are still used by cloud service providers to execute code for developers. However,
developers of serverless applications are not concerned with capacity planning, configuration,
management, maintenance, operating or scaling of containers, VMs, or physical servers.

23
24
25

You might also like