Sistema hexadecimal: diferència entre les revisions

Contingut suprimit Contingut afegit
Desfets els canvis en la revisió 1350586 de Slady
m Desfets els canvis en la revisió 1350950 de 89.247.206.197
Línia 1:
{{nombres}}
En [[matemàtiques]] i [[informàtica]], el sistema hexadecimal (abreujat ''hex'') és un [[sistema numèric]] amb base 16. Es representa normalment utilitzant els símbols 0–9 i A–F o a–f. Per exemple, el nombre [[sistema decimal|decimal]] 79, la representació del qual en [[sistema binari]] és 01001111, es pot escriure com 4F en hexadecimal (4 = 0100, F = 1111). El sistema hexadecimal actual va ser introduït per primera vegada en informàtica el 1963 per [[IBM]]. Una versió anterior, que utilitzava els dígits 0–9 i u–z, va ser utilitzat per l'ordinador [[Bendix G-15]], presentat el 1956.
 
{| border="0" cellspacing="0" cellpadding="0" style="text-align:center;border:2px"
|- style="background:black; height:2px"
| style="background:black; width:2px" | || || || || || || || || || || ||
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || style="width:45px"|'''0'''<sub>hex</sub> || = || style="width:45px"|0<sub>dec</sub> || = || style="width:45px"|0<sub>oct</sub> ||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0 ||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''1'''<sub>hex</sub> || = || 1<sub>dec</sub> || = || 1<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''2'''<sub>hex</sub> || = || 2<sub>dec</sub> ||= || 2<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || '''3'''<sub>hex</sub> || = || 3<sub>dec</sub> || = || 3<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|- style="background:black; height:2px"
| style="background:black; width:2px" | || || || || || || || || || || ||
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''4'''<sub>hex</sub> || = || 4<sub>dec</sub> ||= || 4<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || '''5'''<sub>hex</sub> || = || 5<sub>dec</sub> || = || 5<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|-style="background:#FEE978; color:black; height:24px"
| style="background:black; width:2px" | || '''6'''<sub>hex</sub> || = || 6<sub>dec</sub> ||= || 6<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | ||'''7'''<sub>hex</sub> || = || 7<sub>dec</sub> || = || 7<sub>oct</sub>||style="background:black; width:2px" | || style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|- style="background:black; height:2px"
| style="background:black; width:2px" | || || || || || || || || || || ||
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''8'''<sub>hex</sub> || = || 8<sub>dec</sub> || = || 10<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#FEE978; color:black; height:24px"
| style="background:black; width:2px" | || '''9'''<sub>hex</sub> || = || 9<sub>dec</sub> ||= || 11<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || '''A'''<sub>hex</sub>|| = || 10<sub>dec</sub> || = || 12<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''B'''<sub>hex</sub>|| = || 11<sub>dec</sub> || = || 13<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|- style="background:black; height:2px"
| style="background:black; width:2px" | || || || || || || || || || || ||
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || '''C'''<sub>hex</sub>|| = || 12<sub>dec</sub> || = || 14<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''D'''<sub>hex</sub>|| = || 13<sub>dec</sub> ||= || 15<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|-style="background:#E3EDE9; color:black; height:24px"
| style="background:black; width:2px" | || '''E'''<sub>hex</sub>|| = || 14<sub>dec</sub> ||= || 16<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:white;width:24px"|0||style="background:black; width:2px" |
|-style="background:#FDC888; color:black; height:24px"
| style="background:black; width:2px" | || '''F'''<sub>hex</sub>|| = || 15<sub>dec</sub> || = || 17<sub>oct</sub>||style="background:black; width:2px" | || style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L|| style="background:red;width:24px"|L||style="background:black; width:2px" |
|- style="background:black; height:2px"
| style="background:black; width:2px" | || || || || || || || || || || ||
|}
 
 
Per a convertir un [[nombre decimal]] en hexadecimal manualment, cal dividir el nombre decimal entre 16; el quocient enter d'aquesta divisió es torna a dividir per 16 i així successivament. Quan el darrer quocient sigui inferior a 16, s'escriuen, un darrere de l'altre, el darrer quocient obtingut i tots els residus en ordre invers al de la seva obtenció, substituint aquells nombres que siguin més grans de 9 per la seva lletra corresponent (A=10, B=11, C=12, D=13, E=14 i F=15).