Toshkent Davlat Axborot
Texnalogiyalari Universituti
Kompyuterni tashkil etish
Amaliy_ishi –3, 4
Bajardi: Toyirhojayev Abdulloh
Variant – 6:
Амалий иш №3.Қуйидаги мантиқий ифодаларга мос мантиқий схемани чизинг, ва мантиқий ифоданинг қийматини топинг:
6. F=B& A̅∨ B̅&A, агар A=0, B=1.
F = (A & B) ∨ (Ā & C),
A
|
B
|
B̅
|
Ā
|
Ā & B
|
A& B̅
|
0
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
0
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
0
|
1
|
0
|
0
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
0
|
1
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
1
|
0
|
1
|
1
|
0
|
0
|
0
|
0
|
Ā
& 1
B
1
A
0
&
B̅
Амалий иш №4.Қуйида келтирилган ифодалар учун ассемблер тилида дастур тузинг:
6. ab-2c+3a;
MOV EAX, a EAX = a
MOV EBX, b EBX = b
IMUL EAX, b EAX = EAX * b = ab
MOV ECX, c ECX = c
IMUL ECX, 2 ECX = ECX * 2 = 2c
SUB EAX, ECX EAX = EAX – ECX = ab – 2c
MOV EAX, a EAX = a
IMUL EAX, 3 EAX = EAX * 3 = 3a
ADD EAX, EAX EAX = EAX + EAX = ab – 2c +3a
MOV result, EAX result = EAX = ab -2c + 3a
JMP DONE DONE ga o`tish
Do'stlaringiz bilan baham: |