Wednesday, October 7, 2009

Math Conversions

Convert the following binary numbers to both hexadecimal (base-16) and decimal (base-10)
a. 1011= 8+2+1 1011(base-2) = 8+2+1
= 11(base-10) = 11(base-16) = B
b. 10101= 0001 0101 10101= 0001 0101
= 1+5 = 1, 5
=6 (base-10) = 15 (base-16)
c. 10010110= 1001 0110 10010110= 1001 0110
= 9+6 = 9, 6
=15 (base-10) = 96 (base-16)
d. 1111111= 0111 1111 1111111= 0111 1111
= 7 + 15 = 7, 15
= 22 (base-10) = 7F(base-16)

Convert the following decimal numbers to both binary (base-2) and hexadecimal (base-16)

a. 8 = 1000(base-2) Hex: 1000= 8(base-16)
b. 63: 63-32=31 111111= 0011 1111
31-16=15 = 3F(base-16)
15-8= 7
7-4= 3
3-2= 1

=111111(base-2)
c. 113: 113-64= 49 1110001= 0111 0001
49-32= 17 = 7, 1
17-16= 1 = 71(base-16)

=1110001
d. 97: 97-64= 33 1100001= 0110 0001
33-32= 1 = 6, 1
=1100001 =61(base-16)

Suppose that we want to download a 200 MB file. How long will it take on each of the following connections?

a. A modem that can download at 56 kilobits/second
2^20bytes/megabyte * 2^
3 bytes/bit = 2^23 bits/MB
2^23 bits/MB / 2^10 bits/kilobit = 2^13 kilobits/MB
2^13 * 200 = 1,638,400kilobits
1,638,400 / 56= 29,257secs= 487mins= 8.12hours
b. A DSL connection that can download at 5 Megabits/second
2^23 bits/MB / 2^10 bits/kilobit = 2^13 kilobits/MB
2^13 kilobits/MB / 2^10 kilobits/megabit = 2^3 megabits/MB
2^3 * 200= 1600megabits =200MB
1600/ 5 = 320secs = 5.33mins
c. A high-speed connection that can download 10 Megabits/second
1600megabits / 10megabits/second = 160secs = 2.66mins

If we have an Internet connection that can upload 3 Megabits/second, and an MP3 is 60 Megabytes, how many MP3s can we upload in an hour? In a month (given a reliable connection)?
1 Hour:
8megabits * 60megabits = 480megabits
1 MP3 = 480/3 = 160secs
60mins * 60sec = 3600secs
3600 / 160 = 22.5MP3s

1 Month:
= 30days * 24hrs * 60mins * 60secs = 2,592,000secs
2,592,000 / 160secs = 16,200MP3s