CPU အေၾကာင္းတစ္ေစ့တစ္ေစာင္း
ကြန္ျပဴတာ တလုံး မွာ အဓိက အေရးပါဆုံး က ေတာ့ CPU (Central Processing Unit) ျဖစ္ပါတယ္၊ သူ႕ က သူ႕ဆီ ကို ေရာက္လာ တဲ့ commands (သို႔) instruction set ေတြကို execute တြက္ခ်က္ေပးရပါတယ္။
တကယ္ေတာ့ CPU တခု သည္ logic gates မ်ား ရဲ႕ အစုအေဝး ႀကီး ျဖစ္တာေၾကာင့္ သူသည္ 0 (သို႔) 1 ကိုသာ နားလည္ပါတယ္။ ဒါေၾကာင့္ CPU တခု တြင္ instruction ေတြကို binary form (သို႔) machine code အေနျဖင့္ ဥပမာ။ ။ 1001110001101101 ဆိုၿပီး execute လုပ္ရပါမယ္၊ သို႔ မွသာ စက္ မွ နားလည္ မည္ ျဖစ္ပါတယ္။
1001110001101101 ဆိုတဲ့ စက္ က နားလည္ တဲ့ machine code နဲ႕ programming ေရးဖို႔ ရန္ မွာ၊ လူေတြ အတြက္ အခက္ အခဲ ရွိတာ ေၾကာင့္၊ mnemonic codes ကို အသုံး ျပဳ ၾကပါတယ္၊ အဲဒီ mnemonic codes ေတြ စုေပါင္း ထားတာ ကို ေတာ့ Assembly Language လို႔ ေခၚပါတယ္၊ mnemonic codes ရဲ႕ ဥပမာ တခု ကို ေအာက္တြင္ ေဖၚျပထားပါတယ္။
Mnemonic code
Operation
LDA {value}
Load the Accumulator with a given value
STO E,A
Store the content of register E in register A
ဒါေၾကာင့္ mnemonic codes အစုအေဝး (Assembly Language) သည္ Assembler တြင္ assemble လုပ္ပါက၊ 1001110001101101 ျဖစ္ေသာ machine code ကို ရရွိမည္ျဖစ္သည္၊ Assembly Language ကို low level language လို႔ သတ္မွတ္ပါတယ္။
BASIC, C, C++, Cobol, FORTRAN, Java, Pascal, Perl, PHP, Python, Ruby, နဲ႕ Visual Basic တို႔ ကေတာ့ high level languages မ်ား ျဖစ္ၾကပါတယ္၊ high level language ကေတာ့ လူေတြ အတြက္ ပိုၿပီး ေရးဖို႔၊ ဖတ္ဖို႔၊ နားလည္ဖို႔ လြယ္ကူ သည္သာ မက၊ bug အမွား ရွာေဖြ ဖို႔ ရန္လည္း လြယ္ကူပါတယ္၊ လက္ေတြ႕ နယ္ပယ္တြင္ လည္း နားလည္ရ လြယ္ေသာ high level languages မ်ားကို သာ အသုံးမ်ားပါတယ္။
ကြန္ျပဴတာ က high level language ကို နားလည္ ဖို႔ ရန္ အတြက္ ကေတာ့ သူ႕ကို compile လုပ္ၿပီး machine language သို႔ ေျပာင္းလည္း ေပးရန္လိုအပ္ပါတယ္၊ အဲသည္ အတြက္ compiler (သို႔) interpreter လိုအပ္ပါတယ္။
Credits
No comments