What is a bit? the basic unit in computer

Download Report

Transcript What is a bit? the basic unit in computer

• What is a bit?
– the basic unit in computer
– represent a binary number : 0 and 1
• a group of bits can represent any number
– binary
decimal
•0
0
Binary addition
•1
1
1
• 10
2
+ 1
------• 11
3
10
• 100
4
Department of Information Engineering
1
• Byte - a group of 8 bits
– represent decimal number from 0 to 255
– binary
decimal
– 0000 0000
0
– 0000 0001
1
– 0000 0010
2
– ...
...
– 1111 1110
254
– 1111 1111
255
Department of Information Engineering
2
• Computer understands only number, not English
– but numbers can be used to represent alphabets
• decimal
Text
0
1
...
30
31
...
65
...
97
...
Department of Information Engineering
NUL
Control-A
...
0
1
...
A
...
a
...
3
• One alphabet/number takes one byte to store
A for apple
65
32
102
111
(in decimal)
01000001 00100000 01100110 01001111 (in binary)
Department of Information Engineering
4
• How to store one page of text with 300 words?
– If each word is 5 letters long
– total number of alphabets in the text = 300 x 5
= 1500
– take up 1500 bytes of storage
– or 1500 x 8 = 12,000 bits
Department of Information Engineering
5
• What is a 56K modem?
– 56K refers to the speed of transmission
– this means the equipment can transmit 56,000 bits
per second
– another word for speed is called “bandwidth”
– broadband means very fast communication
• Nomenclature
– K = 1,000
(kilo)
• 56K = 56,000
– M = 1,000,000 (mega, million)
• 2M = 2,000,000
– G = 1,000,000,000 (giga, billion)
– T = 1,000,000,000,000 (tera)
Department of Information Engineering
6
• How long does it take to transmit one page of text?
– If the text is 300 words
• equivalent to 12,000 bits
– 56K modem can transmit 56,000 bits per second (bps)
– time to transmit the page = 12,000/56,000
= 0.21 second
Department of Information Engineering
7
• How to record music in digital form
Height is represented
by a 16 bit number
(0 - 65535)
Analog waveform
time
Measure the signal at regular time interval
e.g. CD makes 44,100 measurement/second
or measure at every 0.000022 second
Department of Information Engineering
8
• Storage of a 60 minutes CD
– for one channel
• 3,600 * 44,100 * 2 (bytes) = 320 M bytes
– for two channels (stereo)
• 320 M bytes * 2 = 640 M bytes
• storage capacity of a CD is around 700 M bytes
– includes some other overheads
Department of Information Engineering
9
• Can we listen to CD quality music from Internet using
56K modem?
– Bit rate of CD (single channel)
• 44100 * 16 = 705.6K bits per second
Samples/sec
16 bits/sample
– 56K modem is too slow !!
– Cannot listen to CD on Internet
Department of Information Engineering
10
• Fortunately, with compression technique, we can
reduce the file size of CD
• What is compression?
– Reduce the size of the file by removing redundancy
• What is MP3?
– An audio compression technique
– compression ration is about 12:1
• equivalent size of 60 min music in MP3
– 58.8K bps
– a bit rate that 56K modem is just about to support
Department of Information Engineering
11
• Image
– digital image is represented by dots
– the higher the density of the dots, the better the
resolution
– each dot is called a pixel (or picture element)
• for a digital camera, a small image takes about 600x400
dots
– each dots is represented by three primary colors
– each color is represented by 8 bits (1 byte) for 0 255 levels
– total memory required = 600*400*3 = 720,000 bytes
Department of Information Engineering
12
• Video
– video is a sequence of images
– PAL transmits 50 images/second
• bit rate of video?
– 720,000 * 8 * 50 bits per second
– 288,000,000 bits per second !!
– Not feasible using 56k modem
Department of Information Engineering
13
• Compressed video
– fortunately, video contains a lot of redundancy
– compression ratio: 100 - 1
• so that we only need to transmit 288,000,000/100 bps
– or 2.88 M bps
• therefore in order to watch video at home, we need
broadband communication
Department of Information Engineering
14
• Difference between MPEG1 and MPEG2
– (MPEG: motion picture engineering group)
• MPEG1 (VCD)
– early compression standard
– not very high resolution
– tape quality
– bandwidth ~ 1.5 Mbps
– MP3 means MPEG1 layer 3 (compression for audio)
• MPEG2 (DVD)
– 2nd generation standard
– higher resolution, laser disk quality
– bandwidth ~ 2-4 Mbps
Department of Information Engineering
15
• How to provide broadband Internet access
• Telephone network
– currently you telephone line is slow because it is
shared by many households in the building
– if the line is not shared, much faster
– the technology used by IMS (HK telecom) is called
ASDL (asymmetric digital subscriber loop)
• 1.5 Mbps - 9 Mbps download speed
– asymmetric because upload speed is only around 64128 K bps
• by design, because the volume of download
traffic (to home) is much larger than upload
Department of Information Engineering
16
• Cable
– optical fibre to your building, then copper wire to
your home
– 30 Mbps per channel (BUT SHARED !)
• cable TV was designed for broadcasting
– not point-to-point communication like telephone
• pros and cons
– if many households shared the bandwidth, then
cable is slower than ADSL
– but if there are not many households using the
network simultaneously, cable is fast
– but cable company can always provide more
bandwidth by offering more channels
Department of Information Engineering
17
• Wireless network
– LMDS (local multipoint distribution services0
• attractive to Internet Service Providers (ISP) that
do not have telephone/cable network
• can be deployed quickly and inexpensively
• operate at very high frequency 28GHz
• 155 Mbps
Department of Information Engineering
18
• Low-earth-orbit (LEO) satellites
– LMDS can be blocked by tree
– ADSL needs line of good quality
– but satellites are expensive
• Motorola’s Iridium project is not doing too well
– StarTV may partner some ISPs to provide Internet
service one day
Department of Information Engineering
19
• High speed digital link to home
– bypass the analog telephone network
– use digital (leased) line all the way to home
• e.g CUHK campus network
• new housing projects in HK
• ref: High Speed Data Races Home (Scientific American,
October 1999)
Department of Information Engineering
20