Qhov sib txawv tseem ceeb ntawm ALU thiab CPU yog tias ALU yog ib qho hluav taws xob hluav taws xob uas yog lub subsystem ntawm CPU uas ua cov lej lej thiab cov lej ua haujlwm thaum CPU yog hluav taws xob hluav taws xob uas tswj cov lus qhia ua haujlwm hauv lub computer.
Lub khoos phis tawj muaj ob qho tib si kho vajtse thiab software. Hardware yog cov khoom siv hluav taws xob lossis cov khoom siv tshuab. Software hais txog cov ntaub ntawv thiab cov lus qhia. Qhov tseem ceeb ntawm kev ua haujlwm ntawm lub computer yog CPU. CPU muaj ob lub ntsiab subsystems. Lawv yog ALU thiab Control Unit.
ALU yog dab tsi?
ALU sawv cev rau Arithmetic thiab Logic Unit. Nws yog ib tug subsystem los yog ib feem ntawm CPU. Lub hom phiaj tseem ceeb ntawm nws yog ua haujlwm lej lej thiab logic. Cov kev ua lej lej yog qhov sib ntxiv, rho tawm, faib, sib faib thiab lwm yam. Cov kev ua haujlwm hauv lub ntsiab lus txiav txim siab seb nqe lus twg yog qhov tseeb lossis tsis tseeb. Tsis tas li ntawd, Graphical Processing Units (GPU), Floating Point Units (FPU) kuj muaj ALUs. Ib lub CPU, FPU lossis GPU tuaj yeem muaj ntau ALUs los daws cov kev suav siab.
Figure 01: ALU
ALU ua ntau yam kev suav. Cov khoom siv rau nws yog cov ntaub ntawv uas nws yuav tsum ua haujlwm. Lawv hu ua operands. Hauv kev qhia lej xws li "2 + 3=5", 2 thiab 3 yog cov operands. Qhov '+' yog qhov ntxiv, thiab nws yog tus neeg teb xov tooj. '5' yog qhov tshwm sim ntawm kev ua haujlwm. Daim ntawv teev npe xwm txheej xav tau cov ntaub ntawv ntawm ALU cov haujlwm dhau los lossis kev ua haujlwm tam sim no. Yog li, muaj cov xwm txheej nkag thiab tawm hauv ALU. Ib qho opcode yog cov lus qhia ntawm lub tshuab uas piav qhia tias nws yuav tsum ua haujlwm li cas. Hauv luv luv, yog li ALU ua haujlwm.
YCPU yog dab tsi?
CPU (los yog feem ntau hu ua processor) tuav cov lus qhia ua ntau yam haujlwm ntawm lub computer. Lub subsystems tseem ceeb ntawm CPU yog ALU thiab CU. ALU tswj cov lej lej thiab cov lej ua haujlwm. CU uas sawv cev rau Lub Chaw Tswj Xyuas Kev Tswj Xyuas thiab synchronizes cov haujlwm ntawm lub computer. Thiab nws muaj cov programmable registers thiab lwm yam khoom siv hluav taws xob. Yog li ntawd, nws nqa cov lus qhia los ntawm kev nco, txiav txim siab rau lawv thiab coj lawv mus rau ntau chav nyob kom ua tau raws li qhov xav tau.
Nco yog ib qho tseem ceeb rau CPU ua haujlwm zoo. Nws muab cov lus qhia rau CPU ua, thiab tom qab ua cov ntaub ntawv, qhov tshwm sim rov qab mus rau lub cim xeeb khaws cia. Tsis tas li ntawd, lwm yam khoom siv uas CPU tso siab rau yog lub moos kaw lus, qhov chaw cia khoom thib ob, cov ntaub ntawv thiab chaw nyob tsheb npav. CPU tuaj yeem ua cov lus qhia 32-ntsis lossis 64-ntsis cov lus qhia nyob ntawm lub computer architecture.
Daim duab 02: CPU
Feem ntau, CPU muaj peev xwm hloov cov ntaub ntawv siab. Ntxiv mus, lub moos ceev qhia tus naj npawb ntawm cov lus qhia nws tuaj yeem ua tiav hauv ib pliag. Yog li yog tias CPU moos ceev yog 2 GHz, nws txhais tau tias nws tuaj yeem ua 2 billion cov lus qhia txhua ob. Hauv luv luv, CPU yog qhov tseem ceeb tshaj plaws nyob rau hauv tag nrho lub computer system.
Qhov txawv ntawm ALU thiab CPU yog dab tsi?
ALU vs CPU |
|
ALU yog ib feem ntawm CPU uas ua cov lej lej thiab cov lej ua haujlwm ntawm cov neeg ua haujlwm hauv cov lus qhia hauv computer. | CPU yog ib qho hluav taws xob hluav taws xob hauv lub khoos phis tawj uas nqa cov lus qhia ntawm lub khoos phis tawj los ua haujlwm ntau yam xws li lej lej, kev xav, kev tswj thiab kev tawm tswv yim / tso tawm haujlwm. |
Arithmetic thiab Logic Unit. | Central Processing Unit. |
Lub luag haujlwm tseem ceeb | |
Nqa cov lej lej thiab kev ua lej. | Tau cov lus qhia kom khiav lub computer. |
Lub ntsiab tseem ceeb | |
lej thiab logic | Ua haujlwm kom raug raws sijhawm |
Summary – ALU vs CPU
Qhov txawv ntawm ALU thiab CPU yog ALU yog lub voj voog hluav taws xob, uas yog lub subsystem ntawm CPU uas ua cov lej lej thiab cov lej ua haujlwm thaum CPU yog hluav taws xob hluav taws xob uas tswj cov lus qhia ua haujlwm hauv computer.