Skip to content

Instantly share code, notes, and snippets.

@vd89
Created March 20, 2020 11:04
Show Gist options
  • Save vd89/36f100200b7d11db5d37db658b54df37 to your computer and use it in GitHub Desktop.
Save vd89/36f100200b7d11db5d37db658b54df37 to your computer and use it in GitHub Desktop.
The Number System
23. The decimal expansion of ​ 11/17 is 0.647.​ Find the binary expansion​ of the fraction ​ 11/17.
Ans.
11/17 = 0.647
1011 = (11)10
10001 = (17)10
10001 )10110 ( 0.101001011
10001
--------
0010100
10001
----------
00011000
10001
----------
0011100
10001
---------
010110
10001
--------
= 0.101001011
= (0.647058824)10
24. The decimal expansion of​ 3/11 is 0.2727.​ Find the binary expansion of the ​ fraction 3/11.
Ans.
3/11 = 0.2727
0011 = (3)10
1011 = (11)10
1011 )001100 ( 0.0100011
1011
---------
00010000
1011
---------
00001110
1011
---------
0011
= 0.0100011
= 2^-2+2^-6+2^-7
=0.2734375
=0.272727
25. The following binary numbers are ​ 4-bit 2's complement binary numbers​ . Which of the following operations generate overflow? Justify your answers by translating the operands and results into decimal.
a.0011 + 1100
b.0111 + 1111
c.0111 + 1111
d.0110 + 0010
Ans:
a.
0011
+ 1100
------
= 1111
b.
1111 (Carry)
0111
+ 1111
-------
1 0110 = Bit overflow = 1
d.
11 (Carry)
0110
+ 0010
------
1000
26. What is the significance of the​ 127.0.0.1 address​ ?
Ans:
127.0.0.1 is the loopback Internet protocol (IP) address also referred to as the localhost. The address is used to establish an IP connection to the same machine or computer being used by the end-user. The class A network number 127 is assigned the loopback function, that is, a datagram sent by a higher level protocol to a network 127 address should loop back inside the host. No datagram sent to a network 127 address should ever appear on any network anywhere.
The purpose of the loopback range is testing of the TCP/IP protocol implementation on a host. Since the lower layers are short-circuited, sending to a loopback address allows the higher layers (IP and above) to be effectively tested without the chance of problems at the lower layers manifesting themselves. 127.0.0.1 is the address most commonly used for testing purposes.
27. How many​ bits​ are in ​ IPv4 IPv6?
Ans:
IPv4 uses 32 bits for its Internet addresses. That means it can support 2^32 IP addresses in total — around 4.29 billion.
IPv6 utilizes 128-bit Internet addresses. Therefore, it can support 2^128 Internet addresses — 3.402823669x10^38 of them to be exact.
28. Convert this IP Address in Binary Dot Notation 11000000.10010000.00001010.00001010 into its equivalent decimal Dot Notation?
Ans:
11000000.10010000.00001010.00001010
= 192.144.10.10
29. What is the range of IPv4 address ?
Ans:
The IPv4 range is 0.0.0.0 to 255.255.255.255
30. Explain the Classification of IP Addresses ?
Ans:
With an IPv4 IP address, there are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used.
Class A 1.0.0.1 to 126.255.255.254 Supports 16 million hosts on each of 127 networks.
Class B 128.1.0.1 to 191.255.255.254 Supports 65,000 hosts on each of 16,000 networks.
Class C 192.0.1.1 to 223.255.254.254 Supports 254 hosts on each of 2 million networks.
Class D 224.0.0.0 to 239.255.255.255 Reserved for multicast groups.
Class E 240.0.0.0 to 254.255.255.254 Reserved for future use, or research and development purposes.
Ranges 127.x.x.x are reserved for the loopback or localhost, for example, 127.0.0.1 is the loopback address. Range 255.255.255.255 broadcasts to all hosts on the local network.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment