Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet247/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   243   244   245   246   247   248   249   250   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

i
2
i
Abbreviation and Meaning
10
1024
1K (kilo), approximately 1 thousand
20
1048576
1M (meg or mega), approximately 1 million
30
1073741824
1G (gig or giga), approximately 1 billion
40
1099511627776
1T (tera), approximately 1 trillion
50
1125899906842624
1P (peta), approximately 1 quadrillion
60
1152921504606846976
1E (exa), approximately 1 quintillion


636

Appendix
Let us try an example. We will convert 81 from decimal to binary. The steps are shown 
in Table A.3. Here, we see 81 is divided by 2 yielding a quotient of 40 and a remainder of 
1 (81/2 
=
40 and 1/2, the remainder then is 1). We record both values. Now we divide the 
quotient, 40, by 2, which gives us a quotient of 20 and a remainder of 0 (40/2 
=
20 and 0/2, 
so there is no remainder). 20/2 
=
10 and 0/2 (quotient of 10, remainder of 0). 10/2 
=
5 and 
0/2 (quotient of 5, remainder of 0). 5/2 
=
2 and 1/2 (quotient of 2, remainder of 1). 2/2 
=

and 0/2 (quotient of 1, remainder of 0). Finally, 1/2 
=
0 and 1/2 (quotient of 0, remainder 
of 1). Our binary equivalent to 81 then is the collection of remainders from the end of the 
process to the beginning, or 1010001
2
.
Note in our example from Table A.3 our result is a 7-bit number, 1010001
2
. If we wanted 
to store this in 8 bits, we would add a leading 0 giving us 01010001
2
. Given our binary 
result, we can confirm that it is correct by converting it back to decimal: 01010001
2
=
64 
+
16 
+

=
81.
The other approach to convert decimal to binary is in essence the process of converting 
binary to decimal in reverse. Rather than adding up the powers of 2 indicated by the 1 bits 
in the binary number, we must determine which powers of 2 make up the decimal number 
and record those bits as 1s.
For instance, 81 is the result of 64 
+
16 
+

=
0*2
7
+
1*2
6
+
0*2
5
+
1*2
4
+
0*2
3
+
0*2
2
+
0*
2
1
+
1*2
0
=
01010001
2
. To solve the problem through subtraction, we determine the largest 
power of 2 that we can subtract from the original number. With 8 bit numbers, the largest 
power of 2 will be 128. Let us practice a few, starting with 219.
• Largest power of 2 less than or equal to 219 is 128
• 219 

128 
=
91
• Largest power of 2 less than or equal to 91 is 64
• 91 

64 
=
27
• Largest power of 2 less than or equal to 27 is 16
• 27 

16 
=
11
• Largest power of 2 less than or equal to 11 is 8
• 11 


=
3
TABLE A.3 
Example Converting 81 to Binary

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   243   244   245   246   247   248   249   250   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish