Given class B IP address 172.20.112.1
In class B, 16 bit are used for network and remaining 16 bits are used for host.
Now using 1 bit we can create 2 subnets, (0,1)
using 2 bits we can create 4 subnets (0,1,2,3)
using 4 bits we can create 16 subnets (0,1,2,.........15) (<17)
using 5 bits we can create 32 subnets (0,1,..........31) (>=17)
So we need to borrow 5 bits from host.
Subtract 10 – 7 using 2’s complement
To substract 7 from 10 we have to add 2's compliment of 7 to 10.
Binary of 10 = 1010
Binary of 7 = 0111 1's compliment of 7 = 1000 To get 2's compliment, we have to add 1
so 2's compliment of 7 = 1001
1010
+1001
10011
We got carry above. We can discard the carry and the remaining number is our result which is 3
Find the two’s complement of the following number: 10110111(show all steps)
To get two's compliment we have to find 1's compliment and add 1 to it.
1's compliment can be obtained by interchanging 0 with 1 and 1 with 0
1's compliment of 10110111 = 01001000
add 1 now
01001000
+ 1
01001001
so 2's compliment of 10110111 is 01001001
Get Answers For Free
Most questions answered within 1 hours.