Question 1: (6+4)
a) Convert the following IP addresses to binary and vice versa.
Solution:
i)
192.168.1.10
10.50.0.20
140.128.1.4
Decimal to Binary:
| Division | Remainder |
| 192/2 |
|
| 96/2 | 0 |
| 48/2 | 0 |
| 24/2 | 0 |
| 12/2 | 0 |
| 6/2 | 0 |
| 3/2 | 0 |
| ½ | 1 |
| 0/2 | 1 |
11000000
=20×0+21×0+22×0+23×0+24×0+25×0+26×1+27×1
=0+0+0+0+0+0+64+128
=192
Follow same procedure for rest of the figures.
Binary to decimal:
10011011.10101011.00110101.11100101
10011011
=20×1+21×1+22×0+23×1+24×1+25×0+26×0+27×1
=1+1+0+8+16+0+0+128
=52
(start multiplying from right to left)
Follow same procedure for rest of the binary sets.
Regards,
Misbah Yousuf
--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
--
You received this message because you are subscribed to the Google
Groups "vuZs" group.
--
To post a new message on this group, send email to vuZs@googlegroups.com
--
Message Posting Rules: http://vuzs.net/faq/4795-vuzs-google-groups-basic-rules-for-posting-messages.html
--
To unsubscribe from this group, send email to vuZs+unsubscribe@googlegroups.com
--
To join this group Send blank email from your virtual university email address to
vuZs+subscribe@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe
---
For more information Contact vuZs Manager at info@vuzs.net
No comments:
Post a Comment