Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

CENTRE FOR PRE-U STUDIES

Student ID (in Figures) : 1 0 0 2 0 5 7 6 7 7

Student ID (in : One, Zero, Zero, Two, Zero, Five, Seven, Six, Seven,
Words) Seven

Student Name : Srijan Raj Dahal


Course Code & Name : CC217-Networking
Semester : September-December 2020
CC217-Networking
Quiz-7

1. Convert below Binary “1 & 0” to Decimal format

(i) 01010101
(ii) 00111110
(ii) 00000011
(iii) 10101010
(iv) 011
(v) 111
(vi) 11
Ans: Converting the above given binary number into decimal number format;
i) 01010101
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and
then adding it.
= 0×27+1×26+0×25+1×24+0×23+1×22+0×21+1×20
= 0 + 64 + 0 + 16 + 0 + 4 + 0 + 1
= 85.
⸫ (01010101) 2 = (85) 10
ii) 00111110
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and then
adding it.
= 0×27+0×26+1×25+1×24+1×23+1×22+1×21+0×20
= 0 + 0 + 32 + 16 + 8 + 4 + 2 + 0
= 62.
⸫ (00111110) 2 = (62) 10
iii) 00000011
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and then
adding it.
= 0×27+0×26+0×25+0×24+0×23+0×22+1×21+1×20
=0+0+0+0+0+0+2+1
= 3.

1
CC217-Networking
Quiz-7
⸫ (00000011) 2 = (3) 10
iv) 011
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and then
adding it.
= 0×22+1×21+1×20
=0+2+1
= 3.
⸫ (011) 2 = (3) 10
v) 111
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and then
adding it.
= 1×22+1×21+1×20
=4+2+1
= 7.
⸫ (111) 2 = (7) 10
vi) 11
Solution:
Multiplying each digit by 2 where the power gradually increases from right to left and then
adding it.
= 1×21+1×20
=2+1
= 3.
⸫ (11) 2 = (3) 10
2. How many digits in Octal and binary system?
Ans: There are 8 digits (0 to 7) in octal system and 2 digits (0 to 1) in binary system
3. Convert below Decimal numbers to Binary format “1 & 0”.
(i) 124
(ii) 224
(iii) 118
(iv) 2543
Ans: Converting decimal number into binary format;
i) 124
2
CC217-Networking
Quiz-7
Solution,

Division by 2 Quotient Remainder


124/2 62 0
62/2 31 0
31/2 15 1
15/2 7 1
7/2 3 1
3/2 1 1
1/2 0 1
⸫ (124)10 = (1111100)2

ii) 224
Solution,

Division by 2 Quotient Remainder


224/2 112 0
112/2 56 0
56/2 28 0
14/2 7 0
7/2 3 1
3/2 1 1
1/2 0 1
⸫ (224)10 = (1110000)2

iii) 118
Solution,

Division by 2 Quotient Remainder


118/2 59 0
59/2 29 1
29/2 14 1
14/2 7 0
7/2 3 1
3/2 1 1

3
CC217-Networking
Quiz-7
1/2 0 1

⸫ (224)10 = (1110110)2
iv) 2543
Solution,
Division by 2 Quotient Remainder
2543/2 1271 1
1271/2 635 1
635/2 317 1
317/2 158 1
158/2 79 0
79/2 39 1
39/2 19 1
19/2 9 1
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1
⸫ (2543)10 = (100111101111)2

4. Write a short note on static and dynamic IP address.


Ans: Here is the short description about static and dynamic IP address
Static IP address – A static IP address is an IP address that always stays the same. If you
have a web server, FTP server, or other Internet resource that must have an address that cannot
change, you can get a static IP address from your ISP. A static IP address is usually more
expensive than a dynamic IP address, and some ISPs do not supply static IP addresses. You must
configure a static IP address manually.
Dynamic IP address - A dynamic IP address is an IP address that an ISP lets you use
temporarily. If a dynamic address is not in use, it can be automatically assigned to a different
device. Dynamic IP addresses are assigned using either DHCP or PPPoE.
5. Define Subnet mask with an example.
Ans: A subnet mask is a 32-bit number used to differentiate the network component of an IP
address by dividing the IP address into a network address and host address. In class A default

4
CC217-Networking
Quiz-7
subnet mask is 255.0.0.0, in class B default subnet mask is 255.255.0.0, in class C default subnet
mask is 255.255.255.0

You might also like