CSC 270-D44 Networking Basics Homework #1 Fall 2017 Dr. Wu Name: Je’Kolby Worthy
ID: 3594279 • Letter: C
Question
CSC 270-D44 Networking Basics
Homework #1
Fall 2017
Dr. Wu
Name: Je’Kolby Worthy Score: ___________________
Number Conversion
Convert the following decimal numbers into 8-bit binary:
95 ______1011111_______
241 ________11110001____
Convert the following 8-bit binary numbers into decimal:
11110011 ______243______________
10010101 _____________149_______
Represent the following hextets (16-bit binary numbers) using 4 hexadecimal digits:
0101.1101.0111.1001_________________
1111.0110.1000.1011 _________________
Convert the following IP addresses into binary. Do not forget to put the period, or dot, between each group of eight binary digits:
152.75.109.81 _____________________________________________________________________
65.98.225.248 _____________________________________________________________________
Convert the following compressed IPv6 addresses to the preferred format:
FE80:F1:5C1:BA::6D
_____________________________________________________________________
2001:E7B::A60:FC9:0:B
_____________________________________________________________________
Explanation / Answer
Question -1 :-
-------------------------------
Convert Decimal Numbers to 8 Bit Binary
(Result of division will be taken to next step for division)
X = Input Decimal Value
while(X > 1)
{
nthBit = X%2;
print nthBit
X = X/2
}
}
95 wll be represented by Binary as 01011111
241 wll be represented by Binary as 11110001
Question -2:-
-------------------------------
Convert Biary to DEcimal
Use below formula
Decimal value += (2n * nth bit )
where n is index of bits (n == 0...7)
nth bit is either 1/0
11110011 ______243______________
10010101 _____________149
Question -3:-
-------------------------------
Represent Binary in Hexa decimal values
Hexa Decimal digits are 15 ( 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
Calculate decimal value for each 4 bit set (It will be a value between 0 to 15)
Represent the Decimal value in Hex
( if it is 0...9 use same , if greater than 9 use 10 ->A , 11->B , 12->C, 13->D,14 -> E, 15->F)
0101.1101.0111.1001 5.D.7.9
1111.0110.1000.1011 F.6.8.B
Question -4:-
-------------------------------
Convert IP Address to Binary
Conver Each IPV4 value (seperated by . into Binary )
152.75.109.81 10011000.01001011.01101101.01010001
65.98.225.248 01000001.01100010.11100001.11111000
Question -5:-
-------------------------------
Compressed IPV6 is represented in Hexa Decimal format and remove leading 0's
for example 00FF represented by FF
000F represented by F
FE80:F1:5C1:BA::6D -------> FE80:00F1:05C1:00BA::006D
2001:E7B::A60:FC9:0:B -----------> 2001:0E7B::0A60:0FC9:0000:000B
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.