Binär

Binär klocka

Liknande

  • Oktal
  • Decimal
  • Hexadecimal

Fenomen

Exempel

NummerTalbasen (radix) 2
12^0
22^1
42^2
82^3
162^4
322^5
642^6
1282^7
2562^8
5122^9
10242^10
20482^11
40962^12
81922^13

Konvertera mellan olika talbaser (radix) med Javascript

var ConvertBase = function (num) { return { from : function (baseFrom) { return { to : function (baseTo) { return parseInt(num, baseFrom).toString(baseTo); } }; } }; }; ConvertBase.bin2oct = function (num) { return ConvertBase(num).from(2).to(8); }; ConvertBase.bin2dec = function (num) { return ConvertBase(num).from(2).to(10); }; ConvertBase.bin2hex = function (num) { return ConvertBase(num).from(2).to(16); }; ConvertBase.oct2bin = function (num) { return ConvertBase(num).from(8).to(2); }; ConvertBase.oct2dec = function (num) { return ConvertBase(num).from(8).to(10); }; ConvertBase.oct2hex = function (num) { return ConvertBase(num).from(8).to(16); }; ConvertBase.dec2bin = function (num) { return ConvertBase(num).from(10).to(2); }; ConvertBase.dec2oct = function (num) { return ConvertBase(num).from(10).to(8); }; ConvertBase.dec2hex = function (num) { return ConvertBase(num).from(10).to(16); }; ConvertBase.hex2bin = function (num) { return ConvertBase(num).from(16).to(2); }; ConvertBase.hex2oct = function (num) { return ConvertBase(num).from(16).to(8); }; ConvertBase.hex2dec = function (num) { return ConvertBase(num).from(16).to(10); };

table = document.createElement('table'); for(i = 0; i < 256; i++) { tr = document.createElement('tr'); char = document.createElement('td'); char.innerHTML = String.fromCodePoint(i); tr.appendChild(char); dec = document.createElement('td'); dec.innerHTML = i; tr.appendChild(dec); hex = document.createElement('td'); hex.innerHTML = ConvertBase.dec2hex(i); tr.appendChild(hex); oct = document.createElement('td'); oct.innerHTML = ConvertBase.dec2oct(i); tr.appendChild(oct); bin = document.createElement('td'); bin.innerHTML = ConvertBase.dec2bin(i); tr.appendChild(bin); hexpad = document.createElement('td'); hexpad.innerHTML = 'U+'+ConvertBase.dec2hex(i).padStart(4, 0); tr.appendChild(hexpad); binpad = document.createElement('td'); binpad.innerHTML = ConvertBase.dec2bin(i).padStart(8,0); tr.appendChild(binpad); table.appendChild(tr); text = document.createTextNode("\n"); table.append(text); } document.body.appendChild(table);

Radix

SymbolDec (10)Hex (16)Oct (8)Bin (2)
0000
1111
22210
33311
444100
555101
666110
777111
88101000
99111001
10a121010
11b131011
12c141100
13d151101
14e161110
15f171111
16102010000
17112110001
18122210010
19132310011
20142410100
21152510101
22162610110
23172710111
24183011000
25193111001
261a3211010
271b3311011
281c3411100
291d3511101
301e3611110
311f3711111
322040100000
!332141100001
"342242100010
#352343100011
$362444100100
%372545100101
&382646100110
'392747100111
(402850101000
)412951101001
*422a52101010
+432b53101011
,442c54101100
-452d55101101
.462e56101110
/472f57101111
0483060110000
1493161110001
2503262110010
3513363110011
4523464110100
5533565110101
6543666110110
7553767110111
8563870111000
9573971111001
:583a72111010
;593b73111011
<603c74111100
=613d75111101
>623e76111110
?633f77111111
@64401001000000
A65411011000001
B66421021000010
C67431031000011
D68441041000100
E69451051000101
F70461061000110
G71471071000111
H72481101001000
I73491111001001
J744a1121001010
K754b1131001011
L764c1141001100
M774d1151001101
N784e1161001110
O794f1171001111
P80501201010000
Q81511211010001
R82521221010010
S83531231010011
T84541241010100
U85551251010101
V86561261010110
W87571271010111
X88581301011000
Y89591311011001
Z905a1321011010
[915b1331011011
\925c1341011100
]935d1351011101
^945e1361011110
_955f1371011111
`96601401100000
a97611411100001
b98621421100010
c99631431100011
d100641441100100
e101651451100101
f102661461100110
g103671471100111
h104681501101000
i105691511101001
j1066a1521101010
k1076b1531101011
l1086c1541101100
m1096d1551101101
n1106e1561101110
o1116f1571101111
p112701601110000
q113711611110001
r114721621110010
s115731631110011
t116741641110100
u117751651110101
v118761661110110
w119771671110111
x120781701111000
y121791711111001
z1227a1721111010
{1237b1731111011
|1247c1741111100
}1257d1751111101
~1267e1761111110
1277f1771111111
€1288020010000000
1298120110000001
‚1308220210000010
ƒ1318320310000011
„1328420410000100
…1338520510000101
†1348620610000110
‡1358720710000111
ˆ1368821010001000
‰1378921110001001
Š1388a21210001010
‹1398b21310001011
Œ1408c21410001100
1418d21510001101
Ž1428e21610001110
1438f21710001111
1449022010010000
‘1459122110010001
’1469222210010010
“1479322310010011
”1489422410010100
•1499522510010101
–1509622610010110
—1519722710010111
˜1529823010011000
™1539923110011001
š1549a23210011010
›1559b23310011011
œ1569c23410011100
1579d23510011101
ž1589e23610011110
Ÿ1599f23710011111
 160a024010100000
¡161a124110100001
¢162a224210100010
£163a324310100011
¤164a424410100100
¥165a524510100101
¦166a624610100110
§167a724710100111
¨168a825010101000
©169a925110101001
ª170aa25210101010
«171ab25310101011
¬172ac25410101100
­173ad25510101101
®174ae25610101110
¯175af25710101111
°176b026010110000
±177b126110110001
²178b226210110010
³179b326310110011
´180b426410110100
µ181b526510110101
182b626610110110
·183b726710110111
¸184b827010111000
¹185b927110111001
º186ba27210111010
»187bb27310111011
¼188bc27410111100
½189bd27510111101
¾190be27610111110
¿191bf27710111111
À192c030011000000
Á193c130111000001
Â194c230211000010
Ã195c330311000011
Ä196c430411000100
Å197c530511000101
Æ198c630611000110
Ç199c730711000111
È200c831011001000
É201c931111001001
Ê202ca31211001010
Ë203cb31311001011
Ì204cc31411001100
Í205cd31511001101
Î206ce31611001110
Ï207cf31711001111
Ð208d032011010000
Ñ209d132111010001
Ò210d232211010010
Ó211d332311010011
Ô212d432411010100
Õ213d532511010101
Ö214d632611010110
×215d732711010111
Ø216d833011011000
Ù217d933111011001
Ú218da33211011010
Û219db33311011011
Ü220dc33411011100
Ý221dd33511011101
Þ222de33611011110
ß223df33711011111
à224e034011100000
á225e134111100001
â226e234211100010
ã227e334311100011
ä228e434411100100
å229e534511100101
æ230e634611100110
ç231e734711100111
è232e835011101000
é233e935111101001
ê234ea35211101010
ë235eb35311101011
ì236ec35411101100
í237ed35511101101
î238ee35611101110
ï239ef35711101111
ð240f036011110000
ñ241f136111110001
ò242f236211110010
ó243f336311110011
ô244f436411110100
õ245f536511110101
ö246f636611110110
÷247f736711110111
ø248f837011111000
ù249f937111111001
ú250fa37211111010
û251fb37311111011
ü252fc37411111100
ý253fd37511111101
þ254fe37611111110
ÿ255ff37711111111
Dosa för Nintendo 64 Nintendo 64 Commodore 64 (CD64)