Elektroniki zedijithali: iziseko ezibini

NguDoug Lowe

Iisekethe zedijithali ezixhomekeke kwinkqubo yamanani yokubini. Ke, ngaphambi kokuba uqonde iinkcukacha zendlela iisekethe zedijithali ezisebenza ngayo, kufuneka uqonde ukuba isebenza njani inkqubo yokubala amanani okubini.



UBhanari yenye yezona zilula kuzo zonke iinkqubo zamanani kuba inamanani amabini kuphela: 0 kunye 1. Kwinkqubo yedesimali (abantu abaninzi abayiqhelileyo) usebenzisa amanani ali-10: 0 ukuya ku-9.



Kwinani eliqhelekileyo lokugqibela, elinjenge-3,482, elona nani lichanekileyo limele ezo; amanani alandelayo asekhohlo, amashumi; elandelayo, ngamakhulu; elandelayo, amawaka; kwaye nangokunjalo. La manani amele amandla alishumi: i-10 yokuqala0(engu-1); ngokulandelayo, 101(10); emva koko zili-10Mbini(100); emva koko zili-103(1,000); kwaye nangokunjalo.

iziphumo ebezingalindelekanga ze-fiorcet

Kwi-binary, unamanani amabini kuphela kuneshumi, yiyo loo nto iinombolo zibini zibonakala zithandeka, njengaku-110011, 101111, kunye no-100001.



Izikhundla kwinombolo yokubini (ebizwa amasuntswana ngaphandle kwe amanani) zimele amagunya amabini endaweni yamandla alishumi: 1, 2, 4, 8, 16, 32, njalo njalo. Ukufumana ixabiso ledesimali yenani le-binary, uphinda-phinda into nganye ngamandla ayo ahambelanayo kwaye emva koko udibanise iziphumo. Ixabiso ledesimali elingu-10111, umzekelo, libalwa ngolu hlobo lulandelayo:

iziphumo ebezingalindelekanga ze-orthotricyclen lo

umfanekiso0.jpg

Ngethamsanqa, ukuguqula inani phakathi kwebhanari kunye nedesimali yinto elungileyo kwikhompyuter- ilunge kakhulu, enyanisweni, ukuba akunakufane kwenzeke ukuba uphinde wenze naluphi na uguquko ngokwakho. Inqaku lokufunda ngokubini kukungakwazi ukujonga inani elinje nge-1110110110110 kwaye kwangoko uthi, Ah! Ezili-7,606!



Nazi ezinye zeempawu ezinomdla kakhulu kubhinari, ezichaza ukuba inkqubo iyafana njani kwaye yahlukile kwinkqubo yedesimali:

  • Kwidesimali, inani leendawo zokugqibela ezinikezelweyo zenani limisela ukuba linokuba likhulu kangakanani inani. Ukuba wabela amanani amathandathu, umzekelo, elona nani likhulu linokubakho ngu-999,999. Kuba u-0 lililo ngokwalo inani, nangona kunjalo, inani elinemivo emi-6 linokuba namaxabiso asisigidi esinye ahlukeneyo.

    umthamo we-motrin kwiintsana

    Kwangokunjalo, inani leebhloko ezabelwe inombolo yokubini limisela ukuba linokuba likhulu kangakanani elo nani. Ukuba wabela ama-bits angama-8, elona xabiso likhulu elinokugcinwa lelo nani liyi-11111111, eyenzeka ngama-255 kwishumi. Ke, inani le-binary elinama-bits angama-8 ubude linokuba namaxabiso ama-256 ahlukeneyo (kubandakanya i-0).

  • Ukukhawuleza ubone ukuba mangaphi amaxabiso awahlukeneyo onokuwagcina kwinani lobunini lobude obunikiweyo, sebenzisa inani leebits njenge-exporter ezimbini. Inombolo ye-8-bit yebhanari, umzekelo, inokubamba u-28amaxabiso. Kuba 28ngu-256, inani elingu-8 linokuba namaxabiso angama-256 ahlukeneyo. Kungenxa yoko le nto a Byte - 8 amasuntswana - anokuba namaxabiso angama-256 ahlukeneyo.

  • La magunya ezinto zimbini kutheni iinkqubo zedijithali zingasebenzisi i-nice, nditsho neenombolo ezijikelezayo zokulinganisa amaxabiso anje ngobungakanani bememori. Ixabiso le-1k, umzekelo, ayizizo ii-byte ezili-1: Ngokwenyani zii-1,024 byte, kuba i-1,024 ngu-210. Ngokufanayo, i-1MB ayizizo ii-byte ezili-1, 000, kodwa zii-1,048,576 byte, ezenzeka ukuba zibe zi-2Amashumi amabini.

    Amandla Ii-Byte Iikhilobytes Amandla Ii-Byte k, MB, okanye i-GB
    Mbini1 Mbini Mbini17 131,072 128k
    MbiniMbini 4 Mbini18 262,144 256k
    Mbini3 8 Mbini19 Ngama-524,288 512k
    Mbini4 16 MbiniAmashumi amabini 1,048,576 1MB
    Mbini5 32 Mbiniamashumi amabini ananye 2,097,152 2MB
    Mbini6 64 Mbini22 4,194,304 4MB
    Mbini7 128 Mbini2. 3 8, 388, 608 8MB
    Mbini8 256 Mbini24 16,777,216 16MB
    Mbini9 512 Mbini25 33,554,432 32MB
    Mbini10 1,024 1k Mbini26 67,108,864 64MB
    MbiniShumi elinanye 2,048 2k Mbini27 134,217,728 128MB
    Mbini12 4,096 4k Mbini28 268,435,456 256MB
    Mbini13 8,192 8k Mbini29 536,870,912 512MB
    Mbini14 16,384 16k Mbini30 1,073,741,824 1GB
    MbiniShumi elinantlanu 32,768 32k Mbini31 2,147,483,648 2GB
    Mbini16 65,536 64k Mbini32 4,294,967,296 I4GB