Razryadli amallar. Razryadli amallar Razryadli diz'yunksiya |, Razryadli
kon'yunksiya &, Razryadli XOR ^, Razryadli inkor !, Razryadli chapga surish<<
va Razryadli o'ngga surish >> amallaridan iborat. Masalan 5 kodi 101 ga teng va
6 kodi 110 ga teng:
6&5= 4=100; 6|5= 7= 111; 6^5=3=011; ~6=4=010.
5<<2=20 yoki 101<<2=10100; 5>>2=1 yoki 101>>2=001=1.
Qiymat berish amali. Oddiy qiymat berish amali binar amal bo’lib chap
operandi odatda uzgaruvchi ung operandi odatda ifodaga teng bo’ladi:
O'zgaruvchi_nomi = ifoda;
Masalan: Z=4.7+3.34; C=y=f=4.2+2.8;
Murakkab qiymat berish amali unar amal bo'lib quyidagi ko'rinishga ega:
O'zgaruvchi_nomi amal= ifoda;
Masalan: x+=4 ifoda x=x+4 ifodaga ekvivalentdir;
x>>=4 ifoda x=x>>4 ifodaga ekvivalentdir;
Shartli amal. Shartli amal ternar amal deyiladi va uchta operanddan iborat
bo’ladi: <1-ifoda>q<2-ifoda>:<3-ifoda>. Masalan: y=a
Do'stlaringiz bilan baham: |