SlideShare a Scribd company logo
Codificació de la informació
Sistema binari: bits i bytes
Josep M. Soler
El bit
• L’ordinador és un sistema, només
treballa amb dos valors el 0 i l’1
• A aquests 0 i 1 els anomenen BITS
• BIT = Unitat mínima d’informació
• Quants valors podem representar amb
un bit?
• Quants valors podem representar amb
un bit?
• Només dos
0
1
• Com podem representar més valors?
• Com podem representar més valors?
• Fent combinacions de bits....
• Si fem combinacions de 2 bits...
• Si fem combinacions de 2 bits...
• Tenim 4 possibilitats:
00
01
10
11
• Si fem combinacions de 3 bits...
• Si fem combinacions de 3 bits...
• Tenim 8 possibilitats:
000
001
010
011
100
101
110
111
• Si fem combinacions de 4 bits...
• Si fem combinacions de 4 bits...
• Tenim 8 possibilitats:
0000 1000
0001 1001
0010 1010
0011 1011
0100 1100
0101 1101
0110 1110
0111 1111
• Fitxeu-vos:
2 bits → 4 combinacions
3 bits → 8 combinacions
4 bits → 16 combinacions
• En general:
n bits → 2n
combinacions
• Quantes combinacions i per tant quants
bits necessitem per representar tot el que
volem (lletres, dígits....)?
• Quantes combinacions i per tant quants
bits necessitem per representar tot el que
volem (lletres, dígits....)?
• Necessitem més de 128 combinacions i
menys de 256....
• Quantes combinacions i per tant quants
bits necessitem per representar tot el que
volem (lletres, dígits....)?
• Necessitem més de 128 combinacions i
menys de 256....
• Per tant necessitem agrupar 8 bits
28
= 256
• Aquestes combinacions:
00000000
00000001
00000010
00000011
...............
...............
11111100
11111101
11111110
11111111
• Aquestes combinacions:
00000000
00000001
00000010
00000011
............... Les anomenem BYTES
...............
11111100
11111101
11111110
11111111
• Per tant:
Un byte és una combinació de 8
bits que representa un caràcter
(lletra, dígit...)
Per exemple el codi ASCII (American Standard
Code for Information Interchange)
Múltiples del byte
• Kilobyte (KB)
1 Kb = 1024 bytes (210
= 1024)
Múltiples del byte
• Kilobyte (KB)
1 Kb = 1024 bytes (210
= 1024)
• Megabyte (MB)
1 MB = 1048576 bytes (220
=1048576)
Múltiples del byte
• Kilobyte (KB)
1 Kb = 1024 bytes (210
= 1024)
• Megabyte (MB)
1 MB = 1048576 bytes (220
=1048576)
• Gigabyte (GB)
1GB = 1073741824 bytes (230
)
Múltiples del byte
• Kilobyte (KB)
1 Kb = 1024 bytes (210
= 1024)
• Megabyte (MB)
1 MB = 1048576 bytes (220
=1048576)
• Gigabyte (GB)
1GB = 1073741824 bytes (230
)
• Terabyte (TB)
1TB = 1099511627776 bytes (240
)

More Related Content

DOC
Xarxes informatiques
PPT
Competicions futbol
PPT
PPT
Sistema Hexadecimal
ODP
Presentaciouniatdeinformacio
ODP
Presentació tema 1 tic
ODP
Presentació Sistemes Binaris
PDF
Xarxes informatiques
Competicions futbol
Sistema Hexadecimal
Presentaciouniatdeinformacio
Presentació tema 1 tic
Presentació Sistemes Binaris

More from Josep Maria Soler Maylinch (6)

PPT
Subtitular Vídeos Amb Dotsub
PPT
Slideshare i XTECBlocs
PPS
Lecturaconplacer
PPS
La Sindicació De Continguts Amb Thunderbird
PPT
Compartir amb Slideshare
Subtitular Vídeos Amb Dotsub
Slideshare i XTECBlocs
Lecturaconplacer
La Sindicació De Continguts Amb Thunderbird
Compartir amb Slideshare
Ad

Codificació de la Informació