Har qanday asosli sanoq sistemada qisqa yozuvda berilgan sonlarni asos (oʻnlik sanoq sistemasi uchun 10 soni olinadi, ikkilik sanoq sistemasi uchun 2 soni olinadi …) darajalari boʻyicha yoyib yozish mumkin va bu pozitsion yoyilma deb yuritiladi.
Masalan, oʻnlikk sanoq sistemasidagi
457
10
{\displaystyle 457_{10}}
sonini
4
×
10
2
+
5
×
10
1
+
7
×
10
0
{\displaystyle 4\times 10^{2}+5\times 10^{1}+7\times 10^{0}}
kabi yozish mumkin. Bu yerda, 7 soni birlar xonasida joylashgan, yaʼni 0 -razryadda joylashgan, shu sababli u
10
0
{\displaystyle 10^{0}}
soniga koʻpaytirilmoqda. 5 soni oʻnlar xonasida joylashgan, yaʼni 1 -razryadda joylashgan, shu sababli u
10
1
{\displaystyle 10^{1}}
soniga koʻpaytirilmoqda va 4 soni yuzlar xonasida joylashgan, yaʼni 2 -razryadda joylashgan, shu sababli u
10
2
{\displaystyle 10^{2}}
soniga koʻpaytirilmoqda. Odatda sonning quyi indeksiga qaysi sanoq sistemasida berilganligi yozib qoʻyiladi, masalan
457
10
{\displaystyle 457_{10}}
soni oʻnlik sanoq sistemasida berilganligini bildiradi.
Boshqa sanoq sistemalarida ham sonlar shu tarzda yoziladi. Masalan, ikkilik sanoq sistemasidagi
1011
2
{\displaystyle 1011_{2}}
sonini quyidagicha yoyib yozish mumkin
1011
2
=
1
×
2
3
+
0
×
2
2
+
1
×
2
1
+
1
×
2
0
{\displaystyle 1011_{2}=1\times 2^{3}+0\times 2^{2}+1\times 2^{1}+1\times 2^{0}}
Berilgan sonni oʻnlik sanoq sistemasiga oʻtkazish uchun uni pozitsion yoyilmasini yozib, koʻpaytirish va qoʻshish amalini bajarish kifoya. Masalan,
a
)
101
2
=
1
×
2
2
+
0
×
2
1
+
1
×
2
0
=
1
×
4
+
0
×
2
+
1
×
1
=
4
+
1
=
5
10
{\displaystyle a)\quad 101_{2}=1\times 2^{2}+0\times 2^{1}+1\times 2^{0}=1\times 4+0\times 2+1\times 1=4+1=5_{10}}
b
)
101011
2
=
1
×
2
5
+
0
×
2
4
+
1
×
2
3
+
0
×
2
2
+
1
×
2
1
+
1
×
2
0
=
32
+
8
+
2
+
1
=
43
10
{\displaystyle b)\quad 101011_{2}=1\times 2^{5}+0\times 2^{4}+1\times 2^{3}+0\times 2^{2}+1\times 2^{1}+1\times 2^{0}=32+8+2+1=43_{10}}
2 sonining darajalari
daraja
(n)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
qiymati (2^n)
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
Shuningdek, oʻnlik sanoq sistemasida soni ikkilik sanoq sistemasiga oʻtkazishni darajaga yoyish usuli ham mavjud. Bu usulda oʻnlik sanoq sistemasida berilgan k sonini ikkining darajalari yigʻindisi koʻrinishida tasvirlanadi. Darajaga yoyib borishda, k sonidan katta boʻlmaydigan ikkining eng katta darajasi olinadi. Masalan,
a
)
37
10
{\displaystyle a)\quad 37_{10}}
tahrir
1
)
2
5
≤
37
<
2
6
{\displaystyle \qquad 1)\quad 2^{5}\leq 37<2^{6}}
bundan,
2
5
{\displaystyle 2^{5}}
ni olamiz. Qolayotgan son:
37
−
2
5
=
37
−
32
=
5
≠
0
{\displaystyle 37-2^{5}=37-32=5\neq 0}
2
)
2
2
≤
5
<
2
3
{\displaystyle \qquad 2)\quad 2^{2}\leq 5<2^{3}}
bundan,
2
2
{\displaystyle 2^{2}}
ni olamiz. Qolayotgan son:
5
−
2
2
=
5
−
4
=
1
≠
0
{\displaystyle 5-2^{2}=5-4=1\neq 0}
3
)
2
0
≤
1
<
2
1
{\displaystyle \qquad 3)\quad 2^{0}\leq 1<2^{1}}
bundan,
2
0
{\displaystyle 2^{0}}
ni olamiz. Qolayotgan son:
1
−
2
0
=
1
−
1
=
0
{\displaystyle 1-2^{0}=1-1=0}
va jarayon tugadi.
demak,
37
10
=
32
+
4
+
1
=
2
5
+
2
2
+
2
0
{\displaystyle 37_{10}=32+4+1=2^{5}+2^{2}+2^{0}}
tarzida yoyilar ekan va bu sonni pozitsion yoyilma koʻrinishiga oʻtkazamiz. Bunda, ishtirok etmagan ikkining darajalari oldida nol koeffitsient bor deb olinadi. Yaʼni
37
10
=
32
+
4
+
1
=
2
5
+
2
2
+
2
0
=
1
×
2
5
+
0
×
2
4
+
0
×
2
3
+
1
×
2
2
+
0
×
2
1
+
1
×
2
0
.
{\displaystyle 37_{10}=32+4+1=2^{5}+2^{2}+2^{0}=1\times 2^{5}+0\times 2^{4}+0\times 2^{3}+1\times 2^{2}+0\times 2^{1}+1\times 2^{0}.}
Endi, ikkining oldidagi koeffitsientlarni razryadiga mos tarzda, ketma-ket yozib olamiz
1
×
2
5
+
0
×
2
4
+
0
×
2
3
+
1
×
2
2
+
0
×
2
1
+
1
×
2
0
→
100101
2
{\displaystyle 1\times 2^{5}+0\times 2^{4}+0\times 2^{3}+1\times 2^{2}+0\times 2^{1}+1\times 2^{0}\rightarrow 100101_{2}}
Yaʼni,
37
10
=
100101
2
{\displaystyle 37_{10}=100101_{2}}
b
)
98
10
{\displaystyle b)\quad 98_{10}}
tahrir
1
)
2
6
≤
98
<
2
7
{\displaystyle \qquad 1)\quad 2^{6}\leq 98<2^{7}}
bundan,
2
6
{\displaystyle 2^{6}}
ni olamiz. Qolayotgan son:
98
−
2
6
=
98
−
64
=
34
≠
0
{\displaystyle 98-2^{6}=98-64=34\neq 0}
2
)
2
5
≤
34
<
2
6
{\displaystyle \qquad 2)\quad 2^{5}\leq 34<2^{6}}
bundan,
2
5
{\displaystyle 2^{5}}
ni olamiz. Qolayotgan son:
34
−
2
5
=
34
−
32
=
2
≠
0
{\displaystyle 34-2^{5}=34-32=2\neq 0}
3
)
2
1
≤
2
<
2
2
{\displaystyle \qquad 3)\quad 2^{1}\leq 2<2^{2}}
bundan,
2
1
{\displaystyle 2^{1}}
ni olamiz. Qolayotgan son:
2
−
2
1
=
2
−
2
=
0
{\displaystyle 2-2^{1}=2-2=0}
va jarayon tugadi.
demak,
98
10
=
64
+
32
+
2
=
2
6
+
2
5
+
2
1
{\displaystyle 98_{10}=64+32+2=2^{6}+2^{5}+2^{1}}
tarzida yoyilar ekan va bu sonni pozitsion yoyilma koʻrinishiga oʻtkazamiz
98
10
=
64
+
32
+
2
=
2
6
+
2
5
+
2
1
=
1
×
2
6
+
1
×
+
2
5
+
0
×
2
4
+
0
×
2
3
+
0
×
2
2
+
1
×
2
1
+
0
×
2
0
{\displaystyle 98_{10}=64+32+2=2^{6}+2^{5}+2^{1}=1\times 2^{6}+1\times +2^{5}+0\times 2^{4}+0\times 2^{3}+0\times 2^{2}+1\times 2^{1}+0\times 2^{0}}
va
1
×
2
6
+
1
×
+
2
5
+
0
×
2
4
+
0
×
2
3
+
0
×
2
2
+
1
×
2
1
+
0
×
2
0
→
1100010
2
{\displaystyle 1\times 2^{6}+1\times +2^{5}+0\times 2^{4}+0\times 2^{3}+0\times 2^{2}+1\times 2^{1}+0\times 2^{0}\rightarrow 1100010_{2}}
Yaʼni,
98
10
=
1100010
2
{\displaystyle 98_{10}=1100010_{2}}
c
)
128
10
{\displaystyle c)\quad 128_{10}}
tahrir
1
)
2
7
≤
128
<
2
8
{\displaystyle \qquad 1)\quad 2^{7}\leq 128<2^{8}}
bundan,
2
7
{\displaystyle 2^{7}}
ni olamiz. Qolayotgan son:
128
−
2
7
=
128
−
128
=
0
{\displaystyle 128-2^{7}=128-128=0}
va jarayon tugadi.
demak,
128
10
=
2
7
{\displaystyle 128_{10}=2^{7}}
tarzida yoyilar ekan va bu sonni pozitsion yoyilma koʻrinishiga oʻtkazamiz
128
10
=
2
7
=
1
×
2
7
+
0
×
2
6
+
0
×
2
5
+
0
×
2
4
+
0
×
2
3
+
0
×
2
2
+
0
×
2
1
+
0
×
2
0
{\displaystyle 128_{10}=2^{7}=1\times 2^{7}+0\times 2^{6}+0\times 2^{5}+0\times 2^{4}+0\times 2^{3}+0\times 2^{2}+0\times 2^{1}+0\times 2^{0}}
va
1
×
2
7
+
0
×
2
6
+
0
×
2
5
+
0
×
2
4
+
0
×
2
3
+
0
×
2
2
+
0
×
2
1
+
0
×
2
0
→
10000000
2
{\displaystyle 1\times 2^{7}+0\times 2^{6}+0\times 2^{5}+0\times 2^{4}+0\times 2^{3}+0\times 2^{2}+0\times 2^{1}+0\times 2^{0}\rightarrow 10000000_{2}}
Yaʼni,
128
10
=
10000000
2
{\displaystyle 128_{10}=10000000_{2}}
d
)
63
10
{\displaystyle d)\quad 63_{10}}
tahrir
1
)
2
5
≤
63
<
2
6
{\displaystyle \qquad 1)\quad 2^{5}\leq 63<2^{6}}
bundan,
2
5
{\displaystyle 2^{5}}
ni olamiz. Qolayotgan son:
63
−
2
5
=
63
−
32
=
31
≠
0
{\displaystyle 63-2^{5}=63-32=31\neq 0}
2
)
2
4
≤
31
<
2
5
{\displaystyle \qquad 2)\quad 2^{4}\leq 31<2^{5}}
bundan,
2
4
{\displaystyle 2^{4}}
ni olamiz. Qolayotgan son:
31
−
2
4
=
31
−
16
=
15
≠
0
{\displaystyle 31-2^{4}=31-16=15\neq 0}
3
)
2
3
≤
15
<
2
4
{\displaystyle \qquad 3)\quad 2^{3}\leq 15<2^{4}}
bundan,
2
3
{\displaystyle 2^{3}}
ni olamiz. Qolayotgan son:
15
−
2
3
=
15
−
8
=
7
≠
0
{\displaystyle 15-2^{3}=15-8=7\neq 0}
4
)
2
2
≤
7
<
2
3
{\displaystyle \qquad 4)\quad 2^{2}\leq 7<2^{3}}
bundan,
2
2
{\displaystyle 2^{2}}
ni olamiz. Qolayotgan son:
7
−
2
2
=
7
−
4
=
3
≠
0
{\displaystyle 7-2^{2}=7-4=3\neq 0}
5
)
2
1
≤
3
<
2
2
{\displaystyle \qquad 5)\quad 2^{1}\leq 3<2^{2}}
bundan,
2
1
{\displaystyle 2^{1}}
ni olamiz. Qolayotgan son:
3
−
2
1
=
3
−
2
=
1
≠
0
{\displaystyle 3-2^{1}=3-2=1\neq 0}
6
)
2
0
≤
1
<
2
0
{\displaystyle \qquad 6)\quad 2^{0}\leq 1<2^{0}}
bundan,
2
0
{\displaystyle 2^{0}}
ni olamiz. Qolayotgan son:
1
−
2
0
=
1
−
1
=
0
{\displaystyle 1-2^{0}=1-1=0}
va jarayon tugadi.
demak,
63
10
=
2
5
+
2
4
+
2
3
+
2
2
+
2
1
+
2
0
{\displaystyle 63_{10}=2^{5}+2^{4}+2^{3}+2^{2}+2^{1}+2^{0}}
tarzida yoyilar ekan va bu sonni pozitsion yoyilma koʻrinishiga oʻtkazamiz
63
10
=
2
5
+
2
4
+
2
3
+
2
2
+
2
1
+
2
0
=
1
×
2
5
+
1
×
2
4
+
1
×
2
3
+
1
×
2
2
+
1
×
2
1
+
1
×
2
0
{\displaystyle 63_{10}=2^{5}+2^{4}+2^{3}+2^{2}+2^{1}+2^{0}=1\times 2^{5}+1\times 2^{4}+1\times 2^{3}+1\times 2^{2}+1\times 2^{1}+1\times 2^{0}}
va
1
×
2
5
+
1
×
2
4
+
1
×
2
3
+
1
×
2
2
+
1
×
2
1
+
1
×
2
0
→
111111
2
{\displaystyle 1\times 2^{5}+1\times 2^{4}+1\times 2^{3}+1\times 2^{2}+1\times 2^{1}+1\times 2^{0}\rightarrow 111111_{2}}
Yaʼni,
63
10
=
111111
2
{\displaystyle 63_{10}=111111_{2}}
Oʻnlik sanoq sistemasidagi nol, boshqa sanoq sistemalarida ham nolga teng, xuddi shuningdek ikkilik sanoq sistemasida ham. Yaʼni,
0
10
=
0
2
{\displaystyle 0_{10}=0_{2}}
Yana qarang